Skip to content

[DOC] set klass correctly for series and dataframe set_axis #30885

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 1 commit into from
Jan 20, 2020

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Jan 10, 2020

@MarcoGorelli MarcoGorelli changed the title 📝 set klass correctly for series and dataframe set_axis [DOC] set klass correctly for series and dataframe set_axis Jan 10, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Jan 10, 2020
@simonjayhawkins
Copy link
Member

Thanks @MarcoGorelli for the PR. will look soon.

@simonjayhawkins
Copy link
Member

sorry @MarcoGorelli struggling to get doc build locally and now AFK for the best part of the day.

@MarcoGorelli
Copy link
Member Author

@simonjayhawkins no hurry :)

@simonjayhawkins
Copy link
Member

@MarcoGorelli should probably also change See Also to have %(klass)s substitution and use substitution for An object of same type as caller otherwise lgtm.

@MarcoGorelli
Copy link
Member Author

@simonjayhawkins sure, done - thanks for your review!

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

Thanks @MarcoGorelli for the updates.

I missed it the first time round, but now that the docstrings are independent, I think could also update axis to axis : %(axes_single_arg)s, default 0 and re-work the docstrings a bit (separate PR OK)

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Any chance you can post a screenshot of the built docs?

axis : {0 or 'index', 1 or 'columns'}, default 0
The axis to update. The value 0 identifies the rows, and 1
identifies the columns.
axis : %(axes_single_arg)s, default 0
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually being substituted?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it, see below

@MarcoGorelli
Copy link
Member Author

MarcoGorelli commented Jan 17, 2020

Thanks @WillAyd for the review.

Sure, here's the output of
python make.py clean
python make.py --single pandas.DataFrame.set_axis
python make.py --single pandas.Series.set_axis

image
image

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. @WillAyd

@WillAyd WillAyd merged commit 7882aac into pandas-dev:master Jan 20, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 20, 2020

Thanks @MarcoGorelli

@MarcoGorelli MarcoGorelli deleted the set-axis-klass branch January 20, 2020 22:27
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: missing docstring substitution for Series/DataFrame.set_axis()
4 participants