I am working for hours on loading a CSV file into Python using the well-known pd.read_csv('..')
However, there is a problem:
Error message : Error tokenizing data. C error: Expected 3991 fields in line 14, saw 4572
But yes, my code is without mistakes.
The CSV looks like this..
{"_id":{"$oid":"5cf683d88eb9ad12c84f6469"},"ID":"22991137","name":"M. Lundströ
Maybe the problem occurs because MongoDB is using strict BSON formats, but honestly - I do not know anything about that.
Does anyone have a solution ?
pd.read_csv(filename, delimiter=",", encoding='utf-8')pandas.io.json.json_normalize? See pandas.pydata.org/pandas-docs/version/0.17.0/generated/…pastebinto provide a link to the whole file?