Error tokenizing data. C error: Buffer overflow caught - possible malformed input file.

2023-11-06

    data = self._reader.read(nrows)
  File "pandas/_libs/parsers.pyx", line 796, in pandas._libs.parsers.TextReader.read
  File "pandas/_libs/parsers.pyx", line 884, in pandas._libs.parsers.TextReader._read_rows
  File "pandas/_libs/parsers.pyx", line 861, in pandas._libs.parsers.TextReader._check_tokenize_status
  File "pandas/_libs/parsers.pyx", line 2029, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file.

解决方法:

将:topicDataDF = pd.read_csv(csvPath, low_memory=False)

改成: topicDataDF = pd.read_csv(csvPath, engine='python')

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Error tokenizing data. C error: Buffer overflow caught - possible malformed input file. 的相关文章

随机推荐