From 8427640542fb66201f27a2ced9c27c75c00be010 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 25 Aug 2024 00:45:01 -0400 Subject: [PATCH 1/2] DOCS: fix docstring validation errors for pandas.Series --- ci/code_checks.sh | 2 -- pandas/core/arrays/arrow/accessors.py | 4 ++++ pandas/core/series.py | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index e9f4ee1f391a2..1edab400ec1bc 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -159,8 +159,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.str.replace SA01" \ -i "pandas.Series.str.wrap RT03,SA01" \ -i "pandas.Series.str.zfill RT03" \ - -i "pandas.Series.struct.dtypes SA01" \ - -i "pandas.Series.to_markdown SA01" \ -i "pandas.Timedelta.asm8 SA01" \ -i "pandas.Timedelta.ceil SA01" \ -i "pandas.Timedelta.components SA01" \ diff --git a/pandas/core/arrays/arrow/accessors.py b/pandas/core/arrays/arrow/accessors.py index d8f948a37d206..d25488c91dc1a 100644 --- a/pandas/core/arrays/arrow/accessors.py +++ b/pandas/core/arrays/arrow/accessors.py @@ -244,6 +244,10 @@ def dtypes(self) -> Series: pandas.Series The data type of each child field. + See Also + ------- + Series.dtype: Return the dtype object of the underlying data. + Examples -------- >>> import pyarrow as pa diff --git a/pandas/core/series.py b/pandas/core/series.py index 5c35c6c0d6d23..3b4866164f356 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1617,6 +1617,11 @@ def to_markdown( str {klass} in Markdown-friendly format. + See Also + ------- + Series.to_frame : Rrite a text representation of object to the system clipboard. + Series.to_latex : Render Series to LaTeX-formatted table. + Notes ----- Requires the `tabulate `_ package. From 6c1c61804efa5f70a689921a08e6a3ddd467b886 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 25 Aug 2024 17:29:05 -0400 Subject: [PATCH 2/2] DOCS: fix underline length --- pandas/core/arrays/arrow/accessors.py | 2 +- pandas/core/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/arrow/accessors.py b/pandas/core/arrays/arrow/accessors.py index d25488c91dc1a..f57d64af7f258 100644 --- a/pandas/core/arrays/arrow/accessors.py +++ b/pandas/core/arrays/arrow/accessors.py @@ -245,7 +245,7 @@ def dtypes(self) -> Series: The data type of each child field. See Also - ------- + -------- Series.dtype: Return the dtype object of the underlying data. Examples diff --git a/pandas/core/series.py b/pandas/core/series.py index 3b4866164f356..4242a081a0bf0 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1618,7 +1618,7 @@ def to_markdown( {klass} in Markdown-friendly format. See Also - ------- + -------- Series.to_frame : Rrite a text representation of object to the system clipboard. Series.to_latex : Render Series to LaTeX-formatted table.