From 159ce3b1575e4a1f3175d7cb2fcb2a46fd1c2ebb Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 13 Feb 2025 19:52:58 +0000 Subject: [PATCH 1/2] docs: add series.info to api reference --- doc/source/reference/series.rst | 1 + doc/source/whatsnew/v3.0.0.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst index 43d7480899dc4..6006acc8f5e16 100644 --- a/doc/source/reference/series.rst +++ b/doc/source/reference/series.rst @@ -25,6 +25,7 @@ Attributes Series.array Series.values Series.dtype + Series.info Series.shape Series.nbytes Series.ndim diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 9fa83e6a10813..4d9a45abe17cd 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -32,6 +32,7 @@ Other enhancements - :class:`pandas.api.typing.SASReader` is available for typing the output of :func:`read_sas` (:issue:`55689`) - :meth:`pandas.api.interchange.from_dataframe` now uses the `PyCapsule Interface `_ if available, only falling back to the Dataframe Interchange Protocol if that fails (:issue:`60739`) - Added :meth:`.Styler.to_typst` to write Styler objects to file, buffer or string in Typst format (:issue:`57617`) +- Added missing :meth:`pandas.Series.info` to API reference (:issue:`60926`) - :class:`pandas.api.typing.NoDefault` is available for typing ``no_default`` - :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`) - :func:`pandas.merge` now validates the ``how`` parameter input (merge type) (:issue:`59435`) From 50b01e34869fde821d204b2224d0beed460e2d07 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:35:49 +0000 Subject: [PATCH 2/2] fixup --- pandas/io/formats/info.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandas/io/formats/info.py b/pandas/io/formats/info.py index b4c6ff8792d52..c9a6e94a0c7c1 100644 --- a/pandas/io/formats/info.py +++ b/pandas/io/formats/info.py @@ -226,12 +226,17 @@ Series.describe: Generate descriptive statistics of Series. Series.memory_usage: Memory usage of Series.""" ) +series_max_cols_sub = dedent( + """\ + max_cols : int, optional + Unused, exists only for compatibility with DataFrame.info.""" +) series_sub_kwargs = { "klass": "Series", "type_sub": "", - "max_cols_sub": "", + "max_cols_sub": series_max_cols_sub, "show_counts_sub": show_counts_sub, "examples_sub": series_examples_sub, "see_also_sub": series_see_also_sub,