convert dataset to dictionary python code example
Example 1: df col to dict
area_dict = dict(zip(lakes.area, lakes.count))
Example 2: dataframe to dict without index
df.to_dict('list')
area_dict = dict(zip(lakes.area, lakes.count))
df.to_dict('list')