pypicsv95% confidence\u2191 718

pandas.parser.CParserError: Error tokenizing data

Full error message
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 fields in line 3,  saw 12

I have tried to read the pandas docs, but found nothing.

My code is simple:

path = 'GOOG Key Ratios.csv'
#print(open(path).read())
data = pd.read_csv(path)

How can I resolve this? Should I use the csv module or another language?

you could also try; data = pd.read_csv('file1.csv', on_bad_lines='skip') Do note that this will cause the offending lines to be skipped. If you don't expect many bad lines and want to (at least) know their amount and IDs, use on_bad_lines='warn'. For advanced handling of bads, you can pass a callable. Edit For Pandas < 1.3.0 try data = pd.read_csv("file1.csv", error_bad_lines=False) as per pandas API reference.

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/5247a75399866058d91dbdc2ed5af6613cac81942134ec368d02ae982a8d3701
hash \u00b7 5247a75399866058d91dbdc2ed5af6613cac81942134ec368d02ae982a8d3701
pandas.parser.CParserError: Error tokenizing data — DepScope fix | DepScope