I want to create a 2-dimensional tagged data frame. But I every time get a different error.
I use the data as in the picture. sql server query output
docs in json data
我在下面编写的代码
docs = json.loads(docs)
classes = ['internet', 'arıza', 'kesinti', 'fatura', 'fatura',
'telefon', 'spor', 'ekonomi']
#df_docs = pd.DataFrame({'Dokuman': docs, 'Sinif': classes})
#df_docs= pd.Series([docs, classes], index=['Dokuman','Sinif'])
#df_docs = pd.DataFrame.from_dict(docs)
#df_docs = pd.DataFrame({'Dokuman': docs, 'Sinif': classes})
如何在此处设置数据框?
df_docs = pd.DataFrame({'Dokuman': docs, 'Sinif': classes})
使用此代码时出现错误
the number of records in the docs is not equal to the number of records in the classes, so I am getting the error
问题已改善
我是一名优秀的程序员,十分优秀!