Skip to content

ENH: Add option to only merge column header cells in ExcelFormatter. #59081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 25, 2024

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 attack68 and Dr-Irv 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
41 of 44 checks passed
@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