pandas make a dictionary from two 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()