Skip to content

DOC: Corrects 'reindex_axis' docstring #24105

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 13 commits into from
Dec 9, 2018

Conversation

eahogue
Copy link
Contributor

@eahogue eahogue commented Dec 5, 2018

The docstring included a 'tolerance' parameter which is missing from the source. This has been removed.

The docstring did not describe the 'fill_value' parameter. This has been added, mostly reusing the wording in the summary part of the existing docstring.

The docstring included a 'tolerance' parameter which is missing from the source. This has been removed.

The docstring did not describe the 'fill_value' parameter. This has been added, mostly reusing the wording in the summary part of the existing docstring.
Corrects 'reindex_axis' docstring.
@pep8speaks
Copy link

pep8speaks commented Dec 5, 2018

Hello @eahogue! Thanks for updating the PR.

Comment last updated on December 08, 2018 at 23:57 Hours UTC

Shortened description line of 'fill_value' in 'reindex_axis'.
@codecov
Copy link

codecov bot commented Dec 5, 2018

Codecov Report

Merging #24105 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24105      +/-   ##
==========================================
- Coverage   92.21%    92.2%   -0.01%     
==========================================
  Files         161      161              
  Lines       51684    51684              
==========================================
- Hits        47658    47657       -1     
- Misses       4026     4027       +1
Flag Coverage Δ
#multiple 90.61% <100%> (ø) ⬆️
#single 43% <100%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/generic.py 96.65% <100%> (ø) ⬆️
pandas/io/json/json.py 92.61% <0%> (-0.48%) ⬇️
pandas/util/testing.py 87.48% <0%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b5f4d1...ffbad45. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 5, 2018

Codecov Report

Merging #24105 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24105      +/-   ##
==========================================
- Coverage    92.2%    92.2%   -0.01%     
==========================================
  Files         162      162              
  Lines       51700    51700              
==========================================
- Hits        47671    47670       -1     
- Misses       4029     4030       +1
Flag Coverage Δ
#multiple 90.6% <ø> (-0.01%) ⬇️
#single 43.02% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/generic.py 96.65% <ø> (ø) ⬆️
pandas/core/internals/blocks.py 93.65% <0%> (-0.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67faf6c...201ef53. Read the comment docs.

@datapythonista
Copy link
Member

Thanks for the fix @eahogue

Do you mind running ./scripts/validate_docstrings.py pandas.DataFrame.reindex_axis to see if there is any other error.

I think a short summary is missing (a one liner summary), the Returns doesn't have a description, and the example is missing the output.

If you don't mind fixing those, and anything else reported by the script, or that you see, that would be great. So we leave this docstring perfect.

Added periods, reformatted summary, and other changes required by
validate_docstrings.py.
@eahogue
Copy link
Contributor Author

eahogue commented Dec 5, 2018

Thanks, @datapythonista. I have made additional changes and hope I have committed etc correctly. The validation script no longer returns errors. PTAL.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks @eahogue

Looking much better, I added some final comments. If you don't mind addressing those too, and I think we're ready to go.

Copy link
Contributor Author

@eahogue eahogue left a comment

Choose a reason for hiding this comment

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


By default, places NaN in locations having no value in the
previous index. A new object is produced unless the new index
is equivalent to the current one and copy=False.

Copy link
Member

Choose a reason for hiding this comment

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

reindex_axis is a deprecated method, so it would be good to add a

.. deprecated:: 0.21.0
    Use `reindex` instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I have added this to the end of the summary. Based on other docstrings it looks like that's the place to put it.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that looks good!

@datapythonista datapythonista self-assigned this Dec 7, 2018
@jreback
Copy link
Contributor

jreback commented Dec 7, 2018

can you merge master

@datapythonista
Copy link
Member

@eahogue can you fix the conflicts

Also, the deprecation directive should be places between the short and the extended summary, seems like we're doing it wrong in most places: https://numpydoc.readthedocs.io/en/latest/format.html#sections

I create #24143to fix the remaining errors.

@eahogue eahogue closed this Dec 8, 2018
@eahogue eahogue reopened this Dec 8, 2018
@eahogue
Copy link
Contributor Author

eahogue commented Dec 9, 2018

Sorry for the basic question, but the tests have passed but I am not sure what else needs to be done. Have the changes gone through yet?

@jorisvandenbossche jorisvandenbossche merged commit a102b0c into pandas-dev:master Dec 9, 2018
@jorisvandenbossche
Copy link
Member

I think all comments were addressed, so nothing needed to be done any more (except someone merging it).

@eahogue Thanks a lot!

@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Dec 9, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
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.

Wrong argument documentation for reindex_axis
5 participants