pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.59k stars 17.57k forks source link

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

Closed ulido closed 1 week ago

ulido commented 1 week ago

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 commented 1 week ago

Thanks for the review @mroeschke !

mroeschke commented 1 week ago

pre-commit.ci autofix

mroeschke commented 1 week ago

Thanks @ulido