Repository: pandas-dev/pandas
Issue category: Feature Request

Issue:
DOC: Document merge_cells="columns" in to_excel
https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.to_excel.html

The `merge_cells` argument can also take `"columns"` due to #35384. This should be added to the docstring.


Hints:
take

Patch:
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 35014674565ff..3a83a3997f881 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -2211,8 +2211,9 @@ def to_excel(
             via the options ``io.excel.xlsx.writer`` or
             ``io.excel.xlsm.writer``.
 
-        merge_cells : bool, default True
-            Write MultiIndex and Hierarchical Rows as merged cells.
+        merge_cells : bool or 'columns', default False
+            If True, write MultiIndex index and columns as merged cells.
+            If 'columns', merge MultiIndex column cells only.
         {encoding_parameter}
         inf_rep : str, default 'inf'
             Representation for infinity (there is no native representation for


Test patch: