From eba9b401adb80a0a794e55153d3ae88b38665df2 Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Wed, 17 Apr 2024 14:50:21 -0400 Subject: [PATCH 1/3] DOC: Fix docstring error for pandas.DataFrame.dtypes --- ci/code_checks.sh | 2 -- pandas/core/generic.py | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 782d20ac5b724..f848104082de5 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -87,7 +87,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DataFrame.columns SA01" \ -i "pandas.DataFrame.copy SA01" \ -i "pandas.DataFrame.droplevel SA01" \ - -i "pandas.DataFrame.dtypes SA01" \ -i "pandas.DataFrame.ffill SA01" \ -i "pandas.DataFrame.first_valid_index SA01" \ -i "pandas.DataFrame.get SA01" \ @@ -358,7 +357,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.dt.unit GL08" \ -i "pandas.Series.dt.year SA01" \ -i "pandas.Series.dtype SA01" \ - -i "pandas.Series.dtypes SA01" \ -i "pandas.Series.empty GL08" \ -i "pandas.Series.eq PR07,SA01" \ -i "pandas.Series.ffill SA01" \ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 9686c081b5fb3..fbb8f76229745 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6122,6 +6122,10 @@ def dtypes(self): pandas.Series The data type of each column. + See Also + -------- + Series.dtype : Return the dtype object of the underlying data. + Examples -------- >>> df = pd.DataFrame( From a8b6db14dea6698c90a76a8fa8b03d601adbac00 Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Wed, 17 Apr 2024 14:54:35 -0400 Subject: [PATCH 2/3] DOC: Fix docstring error for pandas.DataFrame.get, pandas.Series.get --- ci/code_checks.sh | 2 -- pandas/core/generic.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f848104082de5..e6383096bb19c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -89,7 +89,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DataFrame.droplevel SA01" \ -i "pandas.DataFrame.ffill SA01" \ -i "pandas.DataFrame.first_valid_index SA01" \ - -i "pandas.DataFrame.get SA01" \ -i "pandas.DataFrame.hist RT03" \ -i "pandas.DataFrame.infer_objects RT03" \ -i "pandas.DataFrame.keys SA01" \ @@ -363,7 +362,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.first_valid_index SA01" \ -i "pandas.Series.floordiv PR07" \ -i "pandas.Series.ge PR07,SA01" \ - -i "pandas.Series.get SA01" \ -i "pandas.Series.gt PR07,SA01" \ -i "pandas.Series.hasnans SA01" \ -i "pandas.Series.infer_objects RT03" \ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index fbb8f76229745..258880818a417 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -4203,6 +4203,11 @@ def get(self, key, default=None): same type as items contained in object Item for given key or ``default`` value, if key is not found. + See Also + -------- + DataFrame.get : Get item from object for given key (ex: DataFrame column). + Series.get : Get item from object for given key (ex: DataFrame column). + Examples -------- >>> df = pd.DataFrame( From 3d084b8bf8df4f722a3948907937c38a56e9850f Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Wed, 17 Apr 2024 15:21:54 -0400 Subject: [PATCH 3/3] DOC: Fix docstring error for pandas.Series.dtypes --- pandas/core/generic.py | 2 +- pandas/core/series.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 258880818a417..e38cc27766cb4 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6129,7 +6129,7 @@ def dtypes(self): See Also -------- - Series.dtype : Return the dtype object of the underlying data. + Series.dtypes : Return the dtype object of the underlying data. Examples -------- diff --git a/pandas/core/series.py b/pandas/core/series.py index ab24b224b0957..8b36bd0f381c5 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -634,6 +634,10 @@ def dtypes(self) -> DtypeObj: """ Return the dtype object of the underlying data. + See Also + -------- + DataFrame.dtypes : Return the dtypes in the DataFrame. + Examples -------- >>> s = pd.Series([1, 2, 3])