Skip to content

Commit 36bb4da

Browse files
CLN: Cleanup docstrings as by code_checks
Co-Authored-By: Dacops <[email protected]>
1 parent 450f1f3 commit 36bb4da

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Other enhancements
3939
- Users can globally disable any ``PerformanceWarning`` by setting the option ``mode.performance_warnings`` to ``False`` (:issue:`56920`)
4040
- :meth:`Styler.format_index_names` can now be used to format the index and column names (:issue:`48936` and :issue:`47489`)
4141
- :class:`.errors.DtypeWarning` improved to include column names when mixed data types are detected (:issue:`58174`)
42+
- :func:`DataFrame.to_excel` now supports writing notes to an excel files via :meth:`Styler.set_tooltips` (:issue:`58070`)
43+
- :func:`read_excel` now supports reading notes from an excel file (:issue:`58070`)
4244
- :meth:`DataFrame.corrwith` now accepts ``min_periods`` as optional arguments, as in :meth:`DataFrame.corr` and :meth:`Series.corr` (:issue:`9490`)
4345
- :meth:`DataFrame.cummin`, :meth:`DataFrame.cummax`, :meth:`DataFrame.cumprod` and :meth:`DataFrame.cumsum` methods now have a ``numeric_only`` parameter (:issue:`53072`)
4446
- :meth:`DataFrame.fillna` and :meth:`Series.fillna` can now accept ``value=None``; for non-object dtype the corresponding NA value will be used (:issue:`57723`)

pandas/core/generic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,6 @@ def _repr_data_resource_(self):
21312131
Arbitrary keyword arguments passed to excel engine.
21322132
"""
21332133
),
2134-
extra_examples="",
21352134
)
21362135
def to_excel(
21372136
self,
@@ -2263,7 +2262,6 @@ def to_excel(
22632262
automatically chosen depending on the file extension):
22642263
22652264
>>> df1.to_excel("output1.xlsx", engine="xlsxwriter") # doctest: +SKIP
2266-
{extra_examples}
22672265
"""
22682266
if engine_kwargs is None:
22692267
engine_kwargs = {}

pandas/io/excel/_base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
engine_kwargs : dict, optional
282282
Arbitrary keyword arguments passed to excel engine.
283283
284-
notes: DataFrame, default None
284+
notes : DataFrame, default None
285285
A DataFrame to hold the notes extracted from the Excel file.
286286
287287
Returns
@@ -369,6 +369,10 @@
369369
``set_tooltips(notes)`` method of ``Styler.to_excel``, like in
370370
the example below:
371371
372+
>>> df = pd.DataFrame(
373+
... [[1, 100, 200], [2, 200, 300], [3, 300, 400]],
374+
... ) # doctest: +SKIP
375+
372376
>>> notes = pd.DataFrame(
373377
... [["note 1", "note 2"], ["", "note 4"], ["note 5", ""]],
374378
... ) # doctest: +SKIP
@@ -1788,6 +1792,8 @@ def parse(
17881792
DataFrame.
17891793
17901794
.. versionadded:: 2.0
1795+
notes : DataFrame, default None
1796+
A DataFrame to hold the notes extracted from the Excel file.
17911797
**kwds : dict, optional
17921798
Arbitrary keyword arguments passed to excel engine.
17931799

0 commit comments

Comments
 (0)