Skip to content

DOC: styling clean-up of docstrings (part 1, frame.py) #5560

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

Conversation

jorisvandenbossche
Copy link
Member

Some stylistic clean-up of the docstrings in frame.py.

Things changed are mainly:

  • missing spaces aroung the : in param : type
  • explanation of param on second line (instead of on the same line -> there should be the type info)
  • add bullets to enumerations of possible values of a keyword (so they are rendered as a list in the html docstring instead of one continuous block of text) Eg the method keyword explanation in http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.corr.html

@@ -2010,7 +2016,7 @@ def xs(self, key, axis=0, level=None, copy=True, drop_level=True):
which levels are used. Levels can be referred by label or position.
copy : boolean, default True
Whether to make a copy of the data
drop_level, default True
drop_level : boolean, default True
Copy link
Contributor

Choose a reason for hiding this comment

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

bool vs. boolean?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you prefer?

Copy link
Member Author

Choose a reason for hiding this comment

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

A quick count: ca 6 times bool is used and around 50 times boolan in all docstrings in frame.py.

Copy link
Contributor

Choose a reason for hiding this comment

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

okay so go with boolean

@jtratner
Copy link
Contributor

👍

@@ -2146,13 +2152,11 @@ def lookup(self, row_labels, col_labels):

Notes
-----
Akin to
Akin to::
Copy link
Contributor

Choose a reason for hiding this comment

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

double : intentional here?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, so it's regarded as code block.

@jtratner
Copy link
Contributor

@jorisvandenbossche is this ready to be merged? (I'm going to look through one more time, but just wanted to make sure you aren't planning to do anything else)

@jorisvandenbossche
Copy link
Member Author

@jtratner Yes, ready to merge!
I just only changed the bool -> boolean now, and as I said, for the rest more some numpydoc-style changes, not really content changes.

jtratner added a commit that referenced this pull request Nov 23, 2013
…leanup

DOC: styling clean-up of docstrings (part 1, frame.py)
@jtratner jtratner merged commit 141e93a into pandas-dev:master Nov 23, 2013
@jtratner
Copy link
Contributor

Looks good - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants