From a64a091f00c0ec872899f411dc02f618cf7b8376 Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Thu, 2 May 2024 19:27:34 -0400 Subject: [PATCH 1/3] DOC: fix SA01 error for Series.dtype --- ci/code_checks.sh | 1 - pandas/core/series.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9806e7177c9b9..7c642bf79a863 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -197,7 +197,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.dt.tz_convert PR01,PR02" \ -i "pandas.Series.dt.tz_localize PR01,PR02" \ -i "pandas.Series.dt.unit GL08" \ - -i "pandas.Series.dtype SA01" \ -i "pandas.Series.eq PR07,SA01" \ -i "pandas.Series.floordiv PR07" \ -i "pandas.Series.ge PR07,SA01" \ diff --git a/pandas/core/series.py b/pandas/core/series.py index 2065a2ad5530e..8474fd0d74919 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -626,6 +626,13 @@ def dtype(self) -> DtypeObj: """ Return the dtype object of the underlying data. + See Also + -------- + Series.dtypes : Return the dtype object of the underlying data. + Series.astype : Cast a pandas object to a specified dtype dtype. + Series.convert_dtypes : Convert columns to the best possible dtypes using dtypes + supporting pd.NA. + Examples -------- >>> s = pd.Series([1, 2, 3]) From 10d36742e5ce9ac25415332a0430b7bb94189fee Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Thu, 2 May 2024 19:34:05 -0400 Subject: [PATCH 2/3] DOC: fix SA01 error for Series.is_unique --- ci/code_checks.sh | 1 - pandas/core/base.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 7c642bf79a863..2b7176717b6fa 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -204,7 +204,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.hasnans SA01" \ -i "pandas.Series.is_monotonic_decreasing SA01" \ -i "pandas.Series.is_monotonic_increasing SA01" \ - -i "pandas.Series.is_unique SA01" \ -i "pandas.Series.kurt RT03,SA01" \ -i "pandas.Series.kurtosis RT03,SA01" \ -i "pandas.Series.le PR07,SA01" \ diff --git a/pandas/core/base.py b/pandas/core/base.py index 87e87538ca1d9..6bd05e8b068ce 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -1097,6 +1097,12 @@ def is_unique(self) -> bool: ------- bool + See Also + -------- + Series.unique : Return unique values of Series object. + Series.drop_duplicates : Return Series with duplicate values removed. + Series.duplicated : Indicate duplicate Series values. + Examples -------- >>> s = pd.Series([1, 2, 3]) From 68192411e02d5a8c85fe584d2fca24948e0d255a Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Thu, 2 May 2024 19:36:02 -0400 Subject: [PATCH 3/3] DOC: fix SA01 error for Series.shape --- ci/code_checks.sh | 1 - pandas/core/base.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 2b7176717b6fa..039ea9e881d01 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -235,7 +235,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.rsub PR07" \ -i "pandas.Series.rtruediv PR07" \ -i "pandas.Series.sem PR01,RT03,SA01" \ - -i "pandas.Series.shape SA01" \ -i "pandas.Series.skew RT03,SA01" \ -i "pandas.Series.sparse PR01,SA01" \ -i "pandas.Series.sparse.density SA01" \ diff --git a/pandas/core/base.py b/pandas/core/base.py index 6bd05e8b068ce..8b9222a4241a5 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -342,6 +342,12 @@ def shape(self) -> Shape: """ Return a tuple of the shape of the underlying data. + See Also + -------- + Series.ndim : Number of dimensions of the underlying data. + Series.size : Return the number of elements in the underlying data. + Series.nbytes : Return the number of bytes in the underlying data. + Examples -------- >>> s = pd.Series([1, 2, 3])