Skip to content
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

DOC: fix PR02 errors in docstring for pandas.io.formats.style.Styler.to_excel #57230

Merged
merged 2 commits into from
Feb 4, 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 @@ -71,7 +71,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then

MSG='Partially validate docstrings (PR02)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=PR02 --ignore_functions \
pandas.io.formats.style.Styler.to_excel\
pandas.CategoricalIndex.rename_categories\
pandas.CategoricalIndex.reorder_categories\
pandas.CategoricalIndex.add_categories\
Expand Down
12 changes: 9 additions & 3 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
from pandas.core.indexers.objects import BaseIndexer
from pandas.core.resample import Resampler

import textwrap

# goal is to be able to define the docs close to function, while still being
# able to share
_shared_docs = {**_shared_docs}
Expand Down Expand Up @@ -2240,6 +2242,12 @@ def _repr_data_resource_(self):
klass="object",
storage_options=_shared_docs["storage_options"],
storage_options_versionadded="1.2.0",
extra_parameters=textwrap.dedent(
"""\
engine_kwargs : dict, optional
Arbitrary keyword arguments passed to excel engine.
"""
),
)
def to_excel(
self,
Expand Down Expand Up @@ -2315,9 +2323,7 @@ def to_excel(
{storage_options}

.. versionadded:: {storage_options_versionadded}
engine_kwargs : dict, optional
Arbitrary keyword arguments passed to excel engine.

{extra_parameters}
See Also
--------
to_csv : Write DataFrame to a comma-separated values (csv) file.
Expand Down
1 change: 1 addition & 0 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ def set_tooltips(
klass="Styler",
storage_options=_shared_docs["storage_options"],
storage_options_versionadded="1.5.0",
extra_parameters="",
)
def to_excel(
self,
Expand Down
Loading