-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC fix truncated documentation for Series.unstack(), Series. #31260
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
No strong objection but I do think this is a little hacky. Do you know where this limitation is being imposed? |
The issue here is that, every time a ". " (full stop + space) is encountered, it's presumed to be the end of a one line docstring function description. |
doc/source/user_guide/indexing.rst
Outdated
@@ -105,7 +105,7 @@ Basics | |||
------ | |||
|
|||
As mentioned when introducing the data structures in the :ref:`last section | |||
<basics>`, the primary function of indexing with ``[]`` (a.k.a. ``__getitem__`` | |||
<basics>`, the primary function of indexing with ``[]`` (a.k.a ``__getitem__`` |
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.
You don't need to change this in the user guide. The issue only comes up in the first line of docstrings
pandas/core/series.py
Outdated
@@ -3389,7 +3389,7 @@ def explode(self) -> "Series": | |||
See Also | |||
-------- | |||
Series.str.split : Split string values on specified separator. | |||
Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex | |||
Series.unstack : Unstack, a.k.a pivot, Series with MultiIndex |
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.
also not needed here
pandas/core/series.py
Outdated
@@ -3432,7 +3432,7 @@ def explode(self) -> "Series": | |||
|
|||
def unstack(self, level=-1, fill_value=None): | |||
""" | |||
Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame. | |||
Unstack, a.k.a pivot, Series with MultiIndex to produce DataFrame. |
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.
Maybe just reword this to use "or" instead of "a.k.a.", or wite it in full? "also known as"
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.
Alright! Will do that
Thanks @anjalis2112 |
fixes #31235
Changed "e.g. " to "e.g., "
Changed "a.k.a. " to "also known as"
This helps avoid the truncation caused in the docstring