Python Pandas Error tokenizing data

后端 未结 30 3003
不知归路
不知归路 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:47

    Although not the case for this question, this error may also appear with compressed data. Explicitly setting the value for kwarg compression resolved my problem.

    result = pandas.read_csv(data_source, compression='gzip')
    

提交回复
热议问题