convert two columns of dataframe to dictionary code example Example: dataframe to dictionary with one column as key Click to copypd.Series(df.A.values,index=df.B).to_dict()