[go: up one dir, main page]

Skip to content

Commit

Permalink
DOC: Fix RT03 for pandas.Series.str.find (pandas-dev#59394)
Browse files Browse the repository at this point in the history
* fix RT03 for pandas.Series.str.find

* remove check from code_checks.sh

* Remove pandas.Series.str.rfind RT03 from ci
  • Loading branch information
KatsiarynaDzibrova authored Aug 5, 2024
1 parent b6317f2 commit b3215b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-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.find RT03" \
-i "pandas.Series.str.fullmatch RT03" \
-i "pandas.Series.str.get RT03,SA01" \
-i "pandas.Series.str.index RT03" \
Expand All @@ -177,7 +176,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.str.partition RT03" \
-i "pandas.Series.str.repeat SA01" \
-i "pandas.Series.str.replace SA01" \
-i "pandas.Series.str.rfind RT03" \
-i "pandas.Series.str.rindex RT03" \
-i "pandas.Series.str.rjust RT03,SA01" \
-i "pandas.Series.str.rpartition RT03" \
Expand Down
7 changes: 5 additions & 2 deletions pandas/core/strings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2971,6 +2971,9 @@ def extractall(self, pat, flags: int = 0) -> DataFrame:
Returns
-------
Series or Index of int.
A Series (if the input is a Series) or an Index (if the input is an
Index) of the %(side)s indexes corresponding to the positions where the
substring is found in each string of the input.
See Also
--------
Expand All @@ -2980,9 +2983,9 @@ def extractall(self, pat, flags: int = 0) -> DataFrame:
--------
For Series.str.find:
>>> ser = pd.Series(["cow_", "duck_", "do_ve"])
>>> ser = pd.Series(["_cow_", "duck_", "do_v_e"])
>>> ser.str.find("_")
0 3
0 0
1 4
2 2
dtype: int64
Expand Down

0 comments on commit b3215b5

Please sign in to comment.