import pandas as pd
To convert a list of python dictionaries to a Pandas dataframe
my_dict = \ [{'score': 99, 'time': '5:15', 'year': 2010}, {'score': 75, 'time': '8:15', 'year': 2017}, {'score': 82, 'time': '12:30', 'year': 2030}]
df = pd.DataFrame(my_dict) df
Get better at data science interviews by solving a few questions per week
Find a bug? Submit a suggested change on Github, or message me on Twitter.