Skip to content

DOC: fix EX03 in pandas.ExcelWriter #56884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.Timestamp.ceil \
pandas.Timestamp.floor \
pandas.Timestamp.round \
pandas.ExcelWriter \
pandas.read_json \
pandas.io.json.build_table_schema \
pandas.io.formats.style.Styler.to_latex \
Expand Down
7 changes: 4 additions & 3 deletions pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ class ExcelWriter(Generic[_WorkbookT]):
is installed otherwise `openpyxl <https://pypi.org/project/openpyxl/>`__
* `odswriter <https://pypi.org/project/odswriter/>`__ for ods files

See ``DataFrame.to_excel`` for typical usage.
See :meth:`DataFrame.to_excel` for typical usage.

The writer should be used as a context manager. Otherwise, call `close()` to save
and close any opened file handles.
Expand Down Expand Up @@ -1031,7 +1031,7 @@ class ExcelWriter(Generic[_WorkbookT]):
Here, the `if_sheet_exists` parameter can be set to replace a sheet if it
already exists:

>>> with ExcelWriter(
>>> with pd.ExcelWriter(
... "path_to_file.xlsx",
... mode="a",
... engine="openpyxl",
Expand All @@ -1042,7 +1042,8 @@ class ExcelWriter(Generic[_WorkbookT]):
You can also write multiple DataFrames to a single sheet. Note that the
``if_sheet_exists`` parameter needs to be set to ``overlay``:

>>> with ExcelWriter("path_to_file.xlsx",
>>> with pd.ExcelWriter(
... "path_to_file.xlsx",
... mode="a",
... engine="openpyxl",
... if_sheet_exists="overlay",
Expand Down