diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 540bd59cd5924..cd1a2d3763902 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -158,26 +158,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.sparse.sp_values SA01" \ -i "pandas.Series.sparse.to_coo PR07,RT03,SA01" \ -i "pandas.Series.std PR01,RT03,SA01" \ - -i "pandas.Series.str.capitalize RT03" \ - -i "pandas.Series.str.casefold RT03" \ - -i "pandas.Series.str.center RT03,SA01" \ - -i "pandas.Series.str.decode PR07,RT03,SA01" \ - -i "pandas.Series.str.encode PR07,RT03,SA01" \ - -i "pandas.Series.str.ljust RT03,SA01" \ - -i "pandas.Series.str.lower RT03" \ -i "pandas.Series.str.lstrip RT03" \ -i "pandas.Series.str.match RT03" \ -i "pandas.Series.str.normalize RT03,SA01" \ -i "pandas.Series.str.partition RT03" \ -i "pandas.Series.str.repeat SA01" \ -i "pandas.Series.str.replace SA01" \ - -i "pandas.Series.str.rjust RT03,SA01" \ -i "pandas.Series.str.rpartition RT03" \ -i "pandas.Series.str.rstrip RT03" \ -i "pandas.Series.str.strip RT03" \ - -i "pandas.Series.str.swapcase RT03" \ - -i "pandas.Series.str.title RT03" \ - -i "pandas.Series.str.upper RT03" \ -i "pandas.Series.str.wrap RT03,SA01" \ -i "pandas.Series.str.zfill RT03" \ -i "pandas.Series.struct.dtypes SA01" \ diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 25fdafa9b8354..8a2e1cd3f0271 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1749,6 +1749,18 @@ def pad( Returns ------- Series/Index of objects. + A Series or Index where the strings are modified by :meth:`str.%(method)s`. + + See Also + -------- + Series.str.rjust : Fills the left side of strings with an arbitrary + character. + Series.str.ljust : Fills the right side of strings with an arbitrary + character. + Series.str.center : Fills both sides of strings with an arbitrary + character. + Series.str.zfill : Pad strings in the Series/Index by prepending '0' + character. Examples -------- @@ -2024,11 +2036,19 @@ def decode(self, encoding, errors: str = "strict"): Parameters ---------- encoding : str + Specifies the encoding to be used. errors : str, optional + Specifies the error handling scheme. + Possible values are those supported by :meth:`bytes.decode`. Returns ------- Series or Index + A Series or Index with decoded strings. + + See Also + -------- + Series.str.encode : Encodes strings into bytes in a Series/Index. Examples -------- @@ -2063,11 +2083,19 @@ def encode(self, encoding, errors: str = "strict"): Parameters ---------- encoding : str + Specifies the encoding to be used. errors : str, optional + Specifies the error handling scheme. + Possible values are those supported by :meth:`str.encode`. Returns ------- Series/Index of objects + A Series or Index with strings encoded into bytes. + + See Also + -------- + Series.str.decode : Decodes bytes into strings in a Series/Index. Examples -------- @@ -3209,7 +3237,8 @@ def len(self): Returns ------- - Series or Index of object + Series or Index of objects + A Series or Index where the strings are modified by :meth:`str.%(method)s`. See Also --------