convert column to dictionary pandas code example
Example 1: df col to dict
area_dict = dict(zip(lakes.area, lakes.count))
Example 2: columns to dictionary pandas
pd.Series(df.A.values,index=df.B).to_dict()
Example 3: pandas to dictionary
df.to_dict('records')