-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
DOC/CLN: Revise StringMethods docs #9843
Conversation
others : list or array, or list of arrays | ||
If None, returns str concatenating strings of the Series |
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.
In this wording it sounds as all the strings in the series are concatenated
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.
Ah, but this is also the case ..
This is quite a different behaviour when having others or not. Maybe some more explanation or an example would be useful.
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.
Yeah it is better. Added an example.
@jorisvandenbossche Thank you for your comments. Thanks to #9667, CC: @mortada Can you check if you have a chance? |
Return boolean array indicating whether each string starts with passed | ||
pattern | ||
Return boolean ``Series``/``array`` indicating whether each string in the ``Series``/``Index`` | ||
starts with passed pattern. Equivalent to :meth:`str.startswith(pat)`. |
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.
the HTML doc will append ()
and this would show up as "equivalent to str.startswith(pat)()
", probably best to remove the (pat)
at the end
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.
or it would even error, I am not sure. But indeed, just use str.startswith
here
@sinhrks spotted a few minor things (please see comments inline) but otherwise looks good to me, thanks! |
|
||
Examples | ||
-------- | ||
If list-like is specified as an argument, corresponding values are |
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.
I think this should be If
others is specified ...
?
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.
But nice examples!
e0f72f3
to
7f906d3
Compare
@sinhrks One more general comment: you now used I don't think we have a strict rule about this (and in the tutorial docs it is a bit mixed as well), but maybe we should keep it unquoted in the docstring? Opinion? |
@jorisvandenbossche , @mortada Thanks for the comments. I've fixed the docs based on the points. About quotes: I also didn't have a fixed policy, only an impression that no need to quote return values because these are rendered as italic. I agree removing quote is more consistent. How should |
@sinhrks is this good to go? |
Yes, pls check. |
DOC/CLN: Revise StringMethods docs
Thanks! Always good to have more work on the docs |
Thanks for review! Lmk if needs any follow-ups. |
Derived from #9773, #9667. Fix docstrings to meet what current
.str
accessors does.