So you need to either remove the additional field or remove the extra separator if it's there by mistake. comma ',') as a delimiter and you have more separator than expected (more fields in the error row than defined in the header). The Error tokenizing data may arise when you're using separator (for eg. Pd.read_csv('file.csv', error_bad_lines=False)Ībove code will cause the offending lines to be skipped. '\t' ) and header=None tells pandas that your source data has no row for headers/column titles. In the above code, sep parameter defines your delimiter (for eg. Pandas.read_csv(fileName, sep='you_delimiter', header=None) To solve, try specifying the sep and/or header arguments when calling read_csv. confused by the headers/column of the file.In most cases, it might be an issue with: Pandas CParserError: Error tokenizing data
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |