Skip to content

New Excel changes cause an extra line to be generated in the Excel file #2396

Closed
@lbeltrame

Description

@lbeltrame

An example:

In [9]: data = pandas.ExcelFile("sample.xls") # generated with df.to_excel()

In [10]: data.parse(data.sheet_names[0], index_col=0)
Out[10]: 
         Value
ID         NaN
ID1  38.625700
ID2  44.691054

To be more clear, ID is the original index name, but it is shifted down one row when saving to Excel, and then it is picked up as a regular row by the Excel parser.

This kinds of complicates parsing if I'm expecting to read something generated by to_excel()...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions