Skip to content
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: Extend docstring pandas core index to_frame method #20036

Merged
Prev Previous commit
Next Next commit
Move default to parameter description
  • Loading branch information
stijnvanhoey committed Mar 7, 2018
commit b99e4a20ccc824bfdfd3d55176bdf2641d6d5390
5 changes: 3 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,9 @@ def to_frame(self, index=True):

Parameters
----------
index : boolean, default True
Set the index of the returned DataFrame as the original Index.
index : boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

@datapythonista @jorisvandenbossche defaults on the same line, yes?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the documentation still says to use it the numpy way (in brackets after the description), but in pandas-dev the consensus seems to be keeping the pandas way, which was already right in this case. Will update the documentation asap and send an email with the last minute changes to the organizers

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the docstring guide has been updated, but apparently only in the source: https://github.com/python-sprints/python-sprints.github.io/blob/master/pandas/guide/source/pandas_docstring.rst and not yet in the online version

Set the index of the returned DataFrame as the original Index
(default True).

Returns
-------
Expand Down