how to get result from pandas dataframe as dictionary code example
Example 1: df col to dict
area_dict = dict(zip(lakes.area, lakes.count))
Example 2: pandas to dictionary
df.to_dict('records')
area_dict = dict(zip(lakes.area, lakes.count))
df.to_dict('records')