Skip to content

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

Merged
merged 5 commits into from
Jan 24, 2020

Conversation

anjalis2112
Copy link
Contributor

@anjalis2112 anjalis2112 commented Jan 23, 2020

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

@anjalis2112 anjalis2112 changed the title DOC BUG API Reference documentation truncated for Series.unstack(), Series. #31235 DOC fix truncated for Series.unstack(), Series. Jan 23, 2020
@anjalis2112 anjalis2112 changed the title DOC fix truncated for Series.unstack(), Series. fix truncated documentation for Series.unstack(), Series. Jan 23, 2020
@anjalis2112 anjalis2112 changed the title fix truncated documentation for Series.unstack(), Series. DOC fix truncated documentation for Series.unstack(), Series. Jan 23, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 24, 2020

No strong objection but I do think this is a little hacky. Do you know where this limitation is being imposed?

@anjalis2112
Copy link
Contributor Author

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.

@@ -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__``
Copy link
Member

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also not needed here

@@ -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.
Copy link
Member

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright! Will do that

@WillAyd WillAyd added this to the 1.1 milestone Jan 24, 2020
@WillAyd WillAyd merged commit e6991a5 into pandas-dev:master Jan 24, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 24, 2020

Thanks @anjalis2112

@anjalis2112 anjalis2112 deleted the new_doc_edit branch January 24, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC BUG API Reference documentation truncated for Series.unstack(), Series.
4 participants