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: Fix the docstring of groupby in pandas/core/generic.py #22893

Closed
datapythonista opened this issue Sep 29, 2018 · 4 comments · Fixed by #22920
Closed

DOC: Fix the docstring of groupby in pandas/core/generic.py #22893

datapythonista opened this issue Sep 29, 2018 · 4 comments · Fixed by #22920

Comments

@datapythonista
Copy link
Member

pandas docstring are expected to follow the format defined in https://pandas.pydata.org/pandas-docs/stable/contributing_docstring.html

This includes among other things:

  • There is a short description fitting in one line (there can be a longer one after that).
  • The description of the parameters, the returns section, and the see also items, starts with a capital letter and ends with a period.
  • In the Return section there is no name before the type (e.g. transformed : Series) but just the type (e.g. Series) in the first line.
  • The examples are valid PEP-8 code, and when executed, they produce the shown input.

We should make the required adjustments in the docstring of the function groupby in pandas/core/generic.py.

We should validate the docstring with our validator (which does not validate all the formats, but some):

  • ./scripts/validate_docstrings.py pandas.Series.groupby

And we should validate the PEP-8 of the examples (note that the next command will validate the PEP-8 of all examples, just make sure that none of the shown is in the function being addressed, the rest will be fixed in separate issues):

  • flake8 --doctests pandas/core/generic.py
@tonytao2012
Copy link
Contributor

Would it be okay if I took this one?

@datapythonista
Copy link
Member Author

Feel free to pick any that nobody is working on it @tonytao2012, but please just pick one at a time, I see you also said you'd work on resample. And those may be not as fast as you may thing. Let's leave it available for someone else for now if that's all right, and when you finish with resample, surely feel free to continue with this one if nobody is working on it.

Does this make sense?

@tonytao2012
Copy link
Contributor

Whoops, sorry! Sounds good, but I can continue working on groupby instead of resample, as I'm farther ahead in this one.

@datapythonista
Copy link
Member Author

No worries, not a problem at all, I was just explainng.

And absolutely, just have updated comments in both, so everybody knows which one are you working on, and which is free :)

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

Successfully merging a pull request may close this issue.

2 participants