Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS: fix docstring validation errors for pandas.Series #59596

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ 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.match RT03" \
-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" \
Expand Down
38 changes: 38 additions & 0 deletions pandas/core/strings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,9 @@ def match(self, pat: str, case: bool = True, flags: int = 0, na=None):
Returns
-------
Series/Index/array of boolean values
A Series, Index, or array of boolean values indicating whether the start
of each string matches the pattern. The result will be of the same type
as the input.

See Also
--------
Expand Down Expand Up @@ -1503,6 +1506,14 @@ def replace(
* if `pat` is a compiled regex and `case` or `flags` is set
* if `pat` is a dictionary and `repl` is not None.

See Also
--------
Series.str.replace : Method to replace occurrences of a substring with another
substring.
Series.str.extract : Extract substrings using a regular expression.
Series.str.findall : Find all occurrences of a pattern or regex in each string.
Series.str.split : Split each string by a specified delimiter or pattern.

Notes
-----
When `pat` is a compiled regex, all flags should be included in the
Expand Down Expand Up @@ -1634,6 +1645,20 @@ def repeat(self, repeats):
Series or Index of repeated string objects specified by
input parameter repeats.

See Also
--------
Series.str.lower : Convert all characters in each string to lowercase.
Series.str.upper : Convert all characters in each string to uppercase.
Series.str.title : Convert each string to title case (capitalizing the first
letter of each word).
Series.str.strip : Remove leading and trailing whitespace from each string.
Series.str.replace : Replace occurrences of a substring with another substring
in each string.
Series.str.ljust : Left-justify each string in the Series/Index by padding with
a specified character.
Series.str.rjust : Right-justify each string in the Series/Index by padding with
a specified character.

Examples
--------
>>> s = pd.Series(["a", "b", "c"])
Expand Down Expand Up @@ -3091,6 +3116,19 @@ def normalize(self, form):
Returns
-------
Series/Index of objects
A Series or Index of strings in the same Unicode form specified by `form`.
The returned object retains the same type as the input (Series or Index),
and contains the normalized strings.

See Also
--------
Series.str.upper : Convert all characters in each string to uppercase.
Series.str.lower : Convert all characters in each string to lowercase.
Series.str.title : Convert each string to title case (capitalizing the
first letter of each word).
Series.str.strip : Remove leading and trailing whitespace from each string.
Series.str.replace : Replace occurrences of a substring with another substring
in each string.

Examples
--------
Expand Down
Loading