ParserError:标记数据时出错.C错误 [英] ParserError: Error tokenizing data. C error

查看:71
本文介绍了ParserError:标记数据时出错.C错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用脚本 ScriptGlobal.py ,该脚本将调用并执行另外两个脚本 script1.py script2.py exec(open("./script2.py").read()) exec(open("./script1.py").read())

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())

我的script1的输出是创建csv文件. df1.to_csv('file1.csv',index = False)

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

我的script2的输出是另一个csv文件的创建. df2.to_csv('file2.csv',index = False)

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

在我的 ScriptGlobal.py 中,我想读取2个文件file1.csv和file2.csv,然后出现此错误.

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

ParserError:令牌化数据时出错.C错误:第16行中应有1个字段,看到了3

是否有解决方案无需手动执行EXCEL中的操作?

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

谢谢

推荐答案

您是否尝试将这两个.csv文件另存为ANSI?将.csv保存为UTF-8时,我遇到了问题.

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

这篇关于ParserError:标记数据时出错.C错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆