python pandas dataframe to dictionary,df.set_index('id')['value'].to_dict()