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.
Cet exercice fait partie du cours
Python for MATLAB Users
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# View the data type of age_records
print(____(age_records))