pandas dataframe show index and value as a 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')