Trailing delimiter confuses pandas read_csv

前端 未结 3 1525
南笙
南笙 2020-12-16 15:51

A csv (comma delimited) file, where lines have an extra trailing delimiter, seems to confuse pandas.read_csv. (The data file is [1])

It treats the extra

3条回答
  •  無奈伤痛
    2020-12-16 16:16

    For everyone who is still finding this. Wes wrote a blogpost about this. The problem if there is one value too many in the row it is treated as the rows name.

    This behaviour can be changed by setting index_col=False as an option to read_csv.

提交回复
热议问题