Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Convert list of dictionaries to a pandas DataFrame

import pandas as pd

your_list = [{'points': 50, 'time': '5:00', 'year': 2010}, 
 {'points': 25, 'time': '6:00', 'month': "february"}, 
 {'points':90, 'time': '9:00', 'month': 'january'}, 
 {'points_h1':20, 'month': 'june'}]

df = pd.DataFrame(your_list)
 
PREVIOUS NEXT
Tagged: #Convert #list #dictionaries #pandas #DataFrame
ADD COMMENT
Topic
Name
2+8 =