Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas create dataframe from multiple dictionaries

sales = [{'account': 'Jones LLC', 'Jan': 150, 'Feb': 200, 'Mar': 140},
         {'account': 'Alpha Co',  'Jan': 200, 'Feb': 210, 'Mar': 215},
         {'account': 'Blue Inc',  'Jan': 50,  'Feb': 90,  'Mar': 95 }]
df = pd.DataFrame(sales)
Source by pbpython.com #
 
PREVIOUS NEXT
Tagged: #pandas #create #dataframe #multiple #dictionaries
ADD COMMENT
Topic
Name
6+4 =