原本是这样写的:df=pd.DataFrame(train_id,train_docid,train_question,train_answer),就出现了错误,在变量外部加一个中括号写成
df=pd.DataFrame([train_id,train_docid,train_question,train_answer])就好了。train_id,train_docid,train_question,train_answer是4个字符串变量。
2024-01-22 12:03:31
原本是这样写的:df=pd.DataFrame(train_id,train_docid,train_question,train_answer),就出现了错误,在变量外部加一个中括号写成
df=pd.DataFrame([train_id,train_docid,train_question,train_answer])就好了。train_id,train_docid,train_question,train_answer是4个字符串变量。