Skip to content

DOC: Updates to documentation for Series functions #49327

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

Closed
wants to merge 7 commits into from

Conversation

chikausa
Copy link

@chikausa chikausa commented Oct 26, 2022

I wanted to update some functions that are missing documentation in Series, and ended up updating Series.shape, Series.size, Series.dtype, Series.dtypes, and Series.hasnans.

I might have done too much in one PR, so I hope this is okay!

@chikausa
Copy link
Author

Admittedly, I forgot to run pre-commit, so I ran it after. However, since I use conda, it now returns a strange issue when I try to commit. Here's the log from the pre-commit.
image

I downgraded virtualenv in conda, but it still doesn't seem to work...

@mroeschke mroeschke added the Docs label Oct 26, 2022
@mroeschke
Copy link
Member

Were you able to create you contribution environment according to: https://pandas.pydata.org/pandas-docs/stable/development/contributing.html and then run pre-commit install?

@chikausa
Copy link
Author

Were you able to create you contribution environment according to: https://pandas.pydata.org/pandas-docs/stable/development/contributing.html and then run pre-commit install?

Aah, so I was missing that. My apologies! Let me try making my contribution environment and then I'll try running pre-commit install again.

@chikausa
Copy link
Author

chikausa commented Oct 29, 2022

My pre-commit turned out fine, but I'm not sure about these other checks. Is there any way I can pass them?

@mroeschke
Copy link
Member

Looks like another docstring needs to be aligned with the changes you made

     def test_hasnans_uncached_for_series():
        # GH#19700
        idx = Index([0, 1])
        assert idx.hasnans is False
        assert "hasnans" in idx._cache
        ser = idx.to_series()
        assert ser.hasnans is False
        assert not hasattr(ser, "_cache")
        ser.iloc[-1] = np.nan
        assert ser.hasnans is True
>       assert Series.hasnans.__doc__ == Index.hasnans.__doc__
E       AssertionError: assert '\n        Re...rue\n        ' == '\n        Re...ps.\n        '
E         Skipping 81 identical leading characters in diff, use -v to show
E           speedups.
E         + 
E         +         Returns
E         +         --------
E         +         bool
E         +             Whether the Series contains a NaN....
E         
E         ...Full output truncated (8 lines hidden), use '-vv' to show

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Dec 1, 2022
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: overall improvement of docstrings
3 participants