my_dict = {'i':1,'fuck':2,'you':3} 1 import pandas as pd 2 pd.Series(my_dict) 3 fuck 2 4 i 1 5 you 3 6 dtype: int64 一个key只有一个value的字典如果直接转化成数据框会报错 1 pd.DataFrame(my_dict) 2 ValueError: If using all scalar values, you must pass an index 应该做如下转换 1 pd.DataFrame.from_dict(my_dict,orient='index').T