ParserError: Error tokenizing data. C error

痞子三分冷 提交于 2021-01-29 14:01:09

问题


i'm using a script ScriptGlobal.py that will call and execute 2 other scripts script1.py and script2.py exec(open("./script2.py").read()) AND exec(open("./script1.py").read())

The output of my script1 is the creation of csv file. df1.to_csv('file1.csv',index=False)

The output of my script2 is the creation of another csv file. df2.to_csv('file2.csv',index=False)

In my ScriptGlobal.py i want to read the 2 files file1.csv and file2.csv and then i got this error.

ParserError: Error tokenizing data. C error: Expected 1 fields in line 16, saw 3

Is there solution to do it without doing manuallyu the manipulation in EXCEL ?

Thank you


回答1:


Did you try save these two .csv files as ANSI? I had problem with .csv when they were saved as UTF-8.



来源:https://stackoverflow.com/questions/58117142/parsererror-error-tokenizing-data-c-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!