'ParseError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file. (read_csv)

I cannot use read_csv method of pandas properly on kaggle. Error that I get is:

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

I found some suggestions about this (read_excel, read by column). However, they do not help me to solve this error.



Solution 1:[1]

I solved the same problem just by adding engine='python':

df = pd.read_csv(fname, sep='\t',
                 engine='python',
                 header=None)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 alemol