From fc8fc82233e7910f5748acbc24ea6df77f4a233a Mon Sep 17 00:00:00 2001 From: Aditya060 <51037240+Aditya060@users.noreply.github.com> Date: Thu, 18 Jul 2024 00:47:01 +0530 Subject: [PATCH] =?UTF-8?q?Removed=20SA01=20error=20for=20pandas.Series.to?= =?UTF-8?q?=5Fframe.=20Added=20See=20Also=20section=E2=80=A6=20(#59262)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. * Update pandas/core/series.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * Update pandas/core/series.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- 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 f37547e9cea9e..3876e493ce91a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -196,7 +196,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..5b73c94442f1c 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1749,6 +1749,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 -------- >>> s = pd.Series(["a", "b", "c"], name="vals")