Skip to content

writing pandas dataframe fails if index also a column #334

@simonm3

Description

@simonm3

if you do df=df.set_index(df.col1) then you have an index of col1 and a column col1 which is still a valid pandas dataframe.

Range("A1").value = df now fails with "cannot insert col1 already exists as it resets the index before writing. Would be better to output index then columns rather than failing.

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