python 字典转化数据框报错:If using all scalar values, you must pass an index 方法1 a={'python': 2, 'java': 1, 'flask': 2, 'django': 1} b=pd.DataFrame.from_dict([a]).T b=b.reset_index() 方法2 a={'python': 2, 'java': 1, 'flask': 2, 'django': 1} b=pd.DataFrame.from_dict(a,orient='index') b=b.reset_index()