Python Pandas Error tokenizing data

后端 未结 30 2179
不知归路
不知归路 2020-11-22 04:49

I\'m trying to use pandas to manipulate a .csv file but I get this error:

pandas.parser.CParserError: Error tokenizing data. C error: Expected 2 field

30条回答
  •  隐瞒了意图╮
    2020-11-22 05:40

    For those who are having similar issue with Python 3 on linux OS.

    pandas.errors.ParserError: Error tokenizing data. C error: Calling
    read(nbytes) on source failed. Try engine='python'.
    

    Try:

    df.read_csv('file.csv', encoding='utf8', engine='python')
    

提交回复
热议问题