diff --git a/ci/code_checks.sh b/ci/code_checks.sh index a09c4662a1fd9..2eb5b73d68964 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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\ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 78fbb66635dd1..0a4488593495f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -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} @@ -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, @@ -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. diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 0e67949709a22..3a6a44a8be253 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -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,