From 61f800d7b69efa632c5f93b4be4b1e4154c698d7 Mon Sep 17 00:00:00 2001 From: ZKaoChi <1953542921@qq.com> Date: Thu, 14 Nov 2024 05:07:34 +0800 Subject: [PATCH] DOC: Make document merge_cells=columns in to_excel (#60277) * DOC: Make document merge_cells=columns in to_excel * DOC: Make document merge_cells=columns in to_excel * Modify the description --- pandas/core/generic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 56031f20faa16..039bdf9c36ee7 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