标签: python csv pandas dictionary
I use pandas to read df.csv, so I have a Dataframe Like this,
I want to convert it to dict like this
答案 0 :(得分:0)
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_dict.html
尝试:
df.to_dict(orient='list')