Skip to content

ERR: raise on mutli-index columns as its not implemented in to_excel #9794

Closed
@ghost

Description

Try to the following code, and you will find column labels mismatched with the data in the Excel file :

cols = pd.MultiIndex.from_tuples([('site',''),('2014','height'),('2014','weight')])
df = pd.DataFrame(np.random.randn(10,3), columns=cols)
df.to_excel('test.xlsx', index=False)

I am using pandas v0.16.0.

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