pandas create dictionary from columns code example
Example 1: dictionary from two columns pandas
pd.Series(df.A.values,index=df.B).to_dict()
Example 2: dataframe to dictionary with one column as key
pd.Series(df.A.values,index=df.B).to_dict()
pd.Series(df.A.values,index=df.B).to_dict()
pd.Series(df.A.values,index=df.B).to_dict()