Read JSON - PANDAS Read JSON Flashcards

1
Q

Big data sets are often stored, or extracted as JSON.

A

Read JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JSON is plain text, but has the format of an object

A

Read JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Load the JSON file into a DataFrame: df = pd.read_json(‘data.json’)

A

Read JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Use to_string() to print the entire DataFrame.

A

Read JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

JSON objects have the same format as Python dictionaries.

A

Dictionary as JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If your JSON code is not in a file, but in a Python Dictionary, you can load it into a DataFrame directly:

A

Dictionary as JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Exercise - What is a correct syntax for loading a .json file into a DataFrame?

A

df = pd.read_json(‘data.json’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

JSON objects have the same format as a certain Python object, which one?

A

Python Dictionaries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True or False. Python Dictionaries can be loaded directly into a Pandas DataFrame.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly