-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update the pandas.Series.str.rpartition() docstring (Delhi) #20199
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
Conversation
pandas/core/strings.py
Outdated
Split the string at the %(side)s occurrence of `sep`. | ||
|
||
This method splits the string at the %(side)s occurrence of `sep`, | ||
and return 3 elements containing the part before the separator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"return" -> "returns"
pandas/core/strings.py
Outdated
@@ -1635,7 +1637,8 @@ def rsplit(self, pat=None, n=-1, expand=False): | |||
Examples | |||
-------- | |||
|
|||
>>> s = Series(['A_B_C', 'D_E_F', 'X']) | |||
>>> s = pd.Series(['A_B_C', 'D_E_F', 'X']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring is shared with the Index. Could you add a short example with Index
as well? (can be the same data as this one, just in Index
instead of Series.
@darke-spirits do you have time do update the PR based on the feedback? |
Codecov Report
@@ Coverage Diff @@
## master #20199 +/- ##
==========================================
- Coverage 91.9% 91.72% -0.18%
==========================================
Files 160 150 -10
Lines 49904 49152 -752
==========================================
- Hits 45864 45086 -778
- Misses 4040 4066 +26
Continue to review full report at Codecov.
|
Thanks @darke-spirits for the contribution! |
…das-dev#20199) * rpartition docstring is modified * rpartition docstring is modified * Fixing couple of typos, and improving the See Also and Examples section
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
scripts/validate_docstrings.py <your-function-or-method>
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single <your-function-or-method>
Please include the output of the validation script below between the "```" ticks:
If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.