From a list of dictionaries
It's common to end up with a list of dictionaries that contain data you want to analyze. This pattern is especially common when querying data from a database like MySQL, MongoDB, or a RESTful API. Each dictionary is a single record, containing a similar set of keys, which become the columns of the DataFrame.
In this exercise, you will take a list of data, age_records
, where each record is a dictionary (that's 4219 dictionaries), and convert it into a pandas
DataFrame.
This exercise is part of the course
Python for MATLAB Users
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# View the data type of age_records
print(____(age_records))