diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 3f59ad2faae08..281c18237a4a2 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -3760,6 +3760,13 @@ The look and feel of Excel worksheets created from pandas can be modified using to create styled excel files. For documentation on styling spreadsheets, see `here `__. +To make the header row bold when exporting to Excel: + +.. code-block:: python + + df.style.applymap_index(lambda v: "font-weight: bold;", axis="columns").to_excel("out.xlsx") + +For more advanced styling with borders: .. code-block:: python