Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://pandas.pydata.org/docs/user_guide/style.html#Export-to-Excel>`__.

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

Expand Down