From f3b038e316d6bcdc241900f8c02f5a1b24daeff9 Mon Sep 17 00:00:00 2001 From: wenchen-cai Date: Sun, 25 Aug 2024 00:55:18 +0800 Subject: [PATCH] DOCS: fix docstring validation errors for pandas.Series.str --- ci/code_checks.sh | 2 -- pandas/core/strings/accessor.py | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index e9f4ee1f391a2..b88aa477f19d7 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -157,8 +157,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.str.normalize RT03,SA01" \ -i "pandas.Series.str.repeat SA01" \ -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" \ diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 1014c9559afaf..c3d47bc267efd 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1828,6 +1828,7 @@ def zfill(self, width: int): Returns ------- Series/Index of objects. + A Series or Index where the strings are prepended with '0' characters. See Also -------- @@ -2360,6 +2361,13 @@ def wrap( Returns ------- Series or Index + A Series or Index where the strings are wrapped at the specified line width. + + See Also + -------- + Series.str.strip : Remove leading and trailing characters in Series/Index. + Series.str.lstrip : Remove leading characters in Series/Index. + Series.str.rstrip : Remove trailing characters in Series/Index. Notes -----