字典 dict 转为 Dataframe import pandas as pd dict = {'i': 1, 'love': 2, 'nlp': 3} df = pd.DataFrame.from_dict(dict, orient='index') print(df)