Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add list of dictionaries to pandas dataframe

d = [{'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(d)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #list #dictionaries #pandas #dataframe
ADD COMMENT
Topic
Name
2+5 =