dictionary from 2 pandas columns code example Example: dictionary from two columns pandas pd.Series(df.A.values,index=df.B).to_dict()