From f1acc1dccefa4117fb1d3e9c7ef220845d2d30f9 Mon Sep 17 00:00:00 2001 From: Aditya Thapliyal Date: Wed, 17 Jul 2024 17:24:46 +0530 Subject: [PATCH 1/3] Removed SA01 error for pandas.Series.to_frame. Added See Also section to pandas.Series.to_frame. Modified ci/codecheks.sh and pandas/core/series.py. --- ci/code_checks.sh | 1 - pandas/core/series.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 255e680d8dacb..70afb1c6cae18 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -199,7 +199,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.str.zfill RT03" \ -i "pandas.Series.struct.dtypes SA01" \ -i "pandas.Series.to_dict SA01" \ - -i "pandas.Series.to_frame SA01" \ -i "pandas.Series.to_markdown SA01" \ -i "pandas.Series.update PR07,SA01" \ -i "pandas.Timedelta.asm8 SA01" \ diff --git a/pandas/core/series.py b/pandas/core/series.py index 184c774d04a47..231a183ef32f9 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1748,6 +1748,10 @@ def to_frame(self, name: Hashable = lib.no_default) -> DataFrame: ------- DataFrame DataFrame representation of Series. + + See Also + -------- + Series.to_dict : Convert Series to dict object. Examples -------- From 20ef000a5ae92977e0e56234e9bc4fe565715ac1 Mon Sep 17 00:00:00 2001 From: Aditya060 <51037240+Aditya060@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:08:26 +0530 Subject: [PATCH 2/3] Update pandas/core/series.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- pandas/core/series.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 231a183ef32f9..70ebde2cefaf1 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1748,7 +1748,6 @@ def to_frame(self, name: Hashable = lib.no_default) -> DataFrame: ------- DataFrame DataFrame representation of Series. - See Also -------- Series.to_dict : Convert Series to dict object. From 71477a805d2fac960466e9de5b068b9d8579c5e6 Mon Sep 17 00:00:00 2001 From: Aditya060 <51037240+Aditya060@users.noreply.github.com> Date: Thu, 18 Jul 2024 00:07:30 +0530 Subject: [PATCH 3/3] Update pandas/core/series.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- pandas/core/series.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/series.py b/pandas/core/series.py index 70ebde2cefaf1..5b73c94442f1c 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1748,6 +1748,7 @@ def to_frame(self, name: Hashable = lib.no_default) -> DataFrame: ------- DataFrame DataFrame representation of Series. + See Also -------- Series.to_dict : Convert Series to dict object.