pandas
pandas copied to clipboard
DOC: fix RT03 errors in docstrings
Pandas has a script for validating docstrings:
https://github.com/pandas-dev/pandas/blob/44c50b20e8d08613144b3353d9cd0844a53bd077/ci/code_checks.sh#L144-L414
Currently, some methods fail the RT03 check.
The task here is:
- take 2-4 methods
- run: scripts/validate_docstrings.py --format=actions --errors=RT03
method-name
- check if validation docstrings passes for those methods, and if it’s necessary fix the docstrings according to whatever error is reported
- remove those methods from code_checks.sh
- commit, push, open pull request
Please don't comment take as multiple people can work on this issue. You also don't need to ask for permission to work on this, just comment on which methods are you going to work.
If you're new contributor, please check the contributing guide
I don't have permission to add them, but this could probably use some labels:
- CI
- Docs
- good first issue
Addresses https://github.com/pandas-dev/pandas/pull/57356
Will work on
- pandas.Index.to_numpy
- pandas.Categorical.set_categories
Continue with:
- pandas.CategoricalIndex.set_categories (already valid)
- pandas.DataFrame.astype
- pandas.DataFrame.at_time
- pandas.DataFrame.ewm
opened a fix for pandas.DataFrame.expanding
opened a fix for pandas.read_sql
Opened a fix for pandas.read_sql_query
, pandas.read_feather
Opened a fix for below methods:
pandas.DataFrame.min
pandas.DataFrame.max
pandas.DataFrame.mean
pandas.DataFrame.median
pandas.DataFrame.skew
pandas.DataFrame.kurt
Will work on: pandas.DataFrame.expanding - works already pandas.DataFrame.filter pandas.DataFrame.first_valid_index pandas.DataFrame.last_valid_index pandas.DataFrame.get
Continue with: pandas.DataFrame.nsmallest pandas.DataFrame.nunique pandas.DataFrame.pipe pandas.DataFrame.plot.box pandas.DataFrame.plot.density pandas.DataFrame.plot.kde pandas.DataFrame.plot.scatter
Will work on:
- pandas.DataFrame.pop
- pandas.DataFrame.reindex
- pandas.DataFrame.reorder_levels
- pandas.DataFrame.swapaxes - deprecated in favor of .transpose, which already has valid docstring
- pandas.DataFrame.to_numpy
- pandas.DataFrame.to_orc
https://github.com/pandas-dev/pandas/blob/dc19148bf7197a928a129b1d1679b1445a7ea7c7/ci/code_checks.sh#L615-L864
Current status: still 200+ method docstrings need to be fixed, maybe add the "good first issue" tag to get more people involved ;)
agreed! I don't have permissions to add labels, otherwise I would. hopefully a core team member can add that label for us.
thanks for all your work on these!
opened a fix for
pandas.timedelta_range
pandas.util.hash_pandas_object
opened a fix for
pandas.read_orc
pandas.read_sas
pandas.read_spss
pandas.read_stata
Hi all, if CI: speedup docstring check consecutive runs #57826 gets merged in, I might be reworking our approach here; this would look like closing the following issues:
DOC: fix GL08 errors in docstrings DOC: fix PR01 errors in docstrings DOC: fix PR07 errors in docstrings DOC: fix SA01 errors in docstrings DOC: fix RT03 errors in docstrings DOC: fix PR02 errors in docstrings
And opening a new issue to address these based on the new approach.
tl;dr
the work can still be done, but probably under a new ticket once #57826 is merged in
Closed by: CI: speedup docstring check consecutive runs #57826 CI: Better error control in the validation of docstrings #57879
Opening a new issue to fix docstring errors.
Opened DOC: Enforce Numpy Docstring Validation (Parent Issue) #58063 as a parent issue for fixing docstrings based on the refactoring in code_checks.sh
Feel free to swing by and help out! 🙂