Skip to content

Commit cc0ae35

Browse files
authored
DOC: fix EX03 in pandas.ExcelWriter (#56884)
1 parent 321df55 commit cc0ae35

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8282
pandas.Timestamp.ceil \
8383
pandas.Timestamp.floor \
8484
pandas.Timestamp.round \
85-
pandas.ExcelWriter \
8685
pandas.read_json \
8786
pandas.io.json.build_table_schema \
8887
pandas.io.formats.style.Styler.to_latex \

pandas/io/excel/_base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ class ExcelWriter(Generic[_WorkbookT]):
935935
is installed otherwise `openpyxl <https://pypi.org/project/openpyxl/>`__
936936
* `odswriter <https://pypi.org/project/odswriter/>`__ for ods files
937937
938-
See ``DataFrame.to_excel`` for typical usage.
938+
See :meth:`DataFrame.to_excel` for typical usage.
939939
940940
The writer should be used as a context manager. Otherwise, call `close()` to save
941941
and close any opened file handles.
@@ -1031,7 +1031,7 @@ class ExcelWriter(Generic[_WorkbookT]):
10311031
Here, the `if_sheet_exists` parameter can be set to replace a sheet if it
10321032
already exists:
10331033
1034-
>>> with ExcelWriter(
1034+
>>> with pd.ExcelWriter(
10351035
... "path_to_file.xlsx",
10361036
... mode="a",
10371037
... engine="openpyxl",
@@ -1042,7 +1042,8 @@ class ExcelWriter(Generic[_WorkbookT]):
10421042
You can also write multiple DataFrames to a single sheet. Note that the
10431043
``if_sheet_exists`` parameter needs to be set to ``overlay``:
10441044
1045-
>>> with ExcelWriter("path_to_file.xlsx",
1045+
>>> with pd.ExcelWriter(
1046+
... "path_to_file.xlsx",
10461047
... mode="a",
10471048
... engine="openpyxl",
10481049
... if_sheet_exists="overlay",

0 commit comments

Comments
 (0)