Pandas TutorialLesson 7Free preview
Pandas Read JSON
This lesson is part of Pandas · All levels
Summary
In addition to CSV, pandas can read JSON-formatted data via read_json so that the JSON structure of an array of objects directly becomes a DataFrame. This reading is useful for output data of an API or configuration file. After that, the results can be saved back to JSON with to_json if needed.
Key points
- Read_json converts a JSON file or URL to a DataFrame
- Suitable for the resulting API array of objects
- JSON object keys to the name of the DataFrame column
- To_json resets the DataFrame to JSON format
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.