Skip to content

Conversation

@ulido
Copy link
Contributor

@ulido ulido commented Jun 24, 2024

Adds an option to pass merge_cells="columns" in DataFrame.to_excel. This allows only merging MultiIndex column header cells and prevents index cells to be merged.

@ulido ulido requested review from Dr-Irv and attack68 as code owners June 24, 2024 13:16
@mroeschke mroeschke added the IO Excel read_excel, to_excel label Jun 24, 2024
ulido and others added 3 commits June 24, 2024 21:59
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@ulido
Copy link
Contributor Author

ulido commented Jun 24, 2024

Thanks for the review @mroeschke !

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@mroeschke
Copy link
Member

pre-commit.ci autofix

@mroeschke mroeschke added this to the 3.0 milestone Jun 25, 2024
@mroeschke mroeschke merged commit a3babac into pandas-dev:main Jun 25, 2024
@mroeschke
Copy link
Member

Thanks @ulido

@ulido ulido deleted the to-excel-merge-cells-index-columns branch July 25, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO Excel read_excel, to_excel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: The parameter merge_cells parameter in function to_excel should take a 2-tuple one for index and one for columns

2 participants