Skip to content

Commit 86662c4

Browse files
committed
Updating user guide documentation.
1 parent 505b4a8 commit 86662c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/source/user_guide/io.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3912,15 +3912,15 @@ The look and feel of Excel worksheets created from pandas can be modified using
39123912

39133913
As of Pandas 3.0, by default spreadsheets created with the ``to_excel`` method
39143914
will not contain any styling. Users wishing to bold text, add bordered styles,
3915-
etc in a worksheet output by ``to_excel`` can do so by using ``Styler.to_excel``
3916-
to create styled excel files.
3915+
etc in a worksheet output by ``to_excel`` can do so by using :meth:`Styler.to_excel`
3916+
to create styled excel files. For documentation on styling spreadsheets, see
3917+
`here <https://pandas.pydata.org/docs/user_guide/style.html#Export-to-Excel>`__.
39173918

39183919

39193920
.. code-block:: python
39203921
3921-
css = "border: 1pt solid #111222"
3922-
styler = df.style.map(lambda x: css)
3923-
styler.to_excel("path_to_file.xlsx", sheet_name="custom", index=False)
3922+
css = "border: 1px solid black; font-weight: bold;"
3923+
df.style.map_index(lambda x: css).map_index(lambda x: css, axis=1).to_excel("myfile.xlsx")
39243924
39253925
Using the `Xlsxwriter`_ engine provides many options for controlling the
39263926
format of an Excel worksheet created with the ``to_excel`` method. Excellent examples can be found in the

0 commit comments

Comments
 (0)