DOC: Fix the docstring of resample in pandas/core/generic.py
See original GitHub issuepandas 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 resample
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.resample
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
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
pandas docstring guide — pandas 1.5.2 documentation
A Python docstring is a string used to document a Python module, class, ... In case where there are just a set of...
Read more >How to Use Python Docstrings for Effective Code Documentation
Documenting your code is a critical skill for any data scientist or software engineer. This tutorial will show you how using docstrings.
Read more >python - How do you fix "Missing module docstringpylint ...
A python module's docstring documents what the contents of that file are for. You can solve this error by adding a docstring at...
Read more >Documenting Python APIs with docstrings
We use Python docstrings to create reference documentation for our Python APIs. ... set of standard Numpydoc sections (see Numpydoc sections in docstrings)....
Read more >Google Python Style Guide
pylint warnings are each identified by symbolic name ( empty-docstring ) Google-specific warnings start with g- . If the reason for the suppression...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, sorry life intervened and prevented me from finishing this! Sorry for not making that clear.
Hey @datapythonista as the last person who volunteered didn’t eventually open a PR I took a stab at this and made good progress during the London Python Sprints Hacktoberfest meetup, hope I didn’t break any
pandas
etiquette here.I have a question. The
validate_docstrings
script produces errors with deprecated parameters, e.g.Parameters {fill_method, limit, how} not documented
. What is the policy with these parameters?Thanks!