Skip to content

Commit fe42b3b

Browse files
DOCS: fix docstring validation errors for pandas.Series (#59596)
Fixes: -i "pandas.Series.str.match RT03" \ -i "pandas.Series.str.normalize RT03,SA01" \ -i "pandas.Series.str.repeat SA01" \ -i "pandas.Series.str.replace SA01" \
1 parent 2130a99 commit fe42b3b

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
142142
-i "pandas.Series.sparse.sp_values SA01" \
143143
-i "pandas.Series.sparse.to_coo PR07,RT03,SA01" \
144144
-i "pandas.Series.std PR01,RT03,SA01" \
145-
-i "pandas.Series.str.match RT03" \
146-
-i "pandas.Series.str.normalize RT03,SA01" \
147-
-i "pandas.Series.str.repeat SA01" \
148-
-i "pandas.Series.str.replace SA01" \
149145
-i "pandas.Series.str.wrap RT03,SA01" \
150146
-i "pandas.Series.str.zfill RT03" \
151147
-i "pandas.Series.struct.dtypes SA01" \

pandas/core/strings/accessor.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,9 @@ def match(self, pat: str, case: bool = True, flags: int = 0, na=None):
13791379
Returns
13801380
-------
13811381
Series/Index/array of boolean values
1382+
A Series, Index, or array of boolean values indicating whether the start
1383+
of each string matches the pattern. The result will be of the same type
1384+
as the input.
13821385
13831386
See Also
13841387
--------
@@ -1503,6 +1506,14 @@ def replace(
15031506
* if `pat` is a compiled regex and `case` or `flags` is set
15041507
* if `pat` is a dictionary and `repl` is not None.
15051508
1509+
See Also
1510+
--------
1511+
Series.str.replace : Method to replace occurrences of a substring with another
1512+
substring.
1513+
Series.str.extract : Extract substrings using a regular expression.
1514+
Series.str.findall : Find all occurrences of a pattern or regex in each string.
1515+
Series.str.split : Split each string by a specified delimiter or pattern.
1516+
15061517
Notes
15071518
-----
15081519
When `pat` is a compiled regex, all flags should be included in the
@@ -1634,6 +1645,20 @@ def repeat(self, repeats):
16341645
Series or Index of repeated string objects specified by
16351646
input parameter repeats.
16361647
1648+
See Also
1649+
--------
1650+
Series.str.lower : Convert all characters in each string to lowercase.
1651+
Series.str.upper : Convert all characters in each string to uppercase.
1652+
Series.str.title : Convert each string to title case (capitalizing the first
1653+
letter of each word).
1654+
Series.str.strip : Remove leading and trailing whitespace from each string.
1655+
Series.str.replace : Replace occurrences of a substring with another substring
1656+
in each string.
1657+
Series.str.ljust : Left-justify each string in the Series/Index by padding with
1658+
a specified character.
1659+
Series.str.rjust : Right-justify each string in the Series/Index by padding with
1660+
a specified character.
1661+
16371662
Examples
16381663
--------
16391664
>>> s = pd.Series(["a", "b", "c"])
@@ -3091,6 +3116,19 @@ def normalize(self, form):
30913116
Returns
30923117
-------
30933118
Series/Index of objects
3119+
A Series or Index of strings in the same Unicode form specified by `form`.
3120+
The returned object retains the same type as the input (Series or Index),
3121+
and contains the normalized strings.
3122+
3123+
See Also
3124+
--------
3125+
Series.str.upper : Convert all characters in each string to uppercase.
3126+
Series.str.lower : Convert all characters in each string to lowercase.
3127+
Series.str.title : Convert each string to title case (capitalizing the
3128+
first letter of each word).
3129+
Series.str.strip : Remove leading and trailing whitespace from each string.
3130+
Series.str.replace : Replace occurrences of a substring with another substring
3131+
in each string.
30943132
30953133
Examples
30963134
--------

0 commit comments

Comments
 (0)