pandas
pandas copied to clipboard
DOC: Enforce Numpy Docstring Validation | pandas.Index
DOC: Enforce Numpy Docstring Validation (Parent Issue) #58063
Pandas has a script for validating docstrings in code_checks.sh. Currently, some methods fail some of these checks.
pandas.Index
https://github.com/pandas-dev/pandas/blob/c468028f5c2398c04d355cef7a8b6a3952620de2/ci/code_checks.sh#L182-L230
The task is:
-
take 1-5 methods
-
run:
scripts/validate_docstrings.py --format=actions <method-name>
example command: scripts/validate_docstrings.py --format=actions pandas.Categorical.__array__
example output:
################################################################################
################################## Validation ##################################
################################################################################
2 Errors found for `pandas.Categorical.__array__`:
ES01 No extended summary found
SA01 See Also section not found
-
check if validation docstrings passes for those methods, and if it’s necessary fix the docstrings according to whatever error is reported. Note: We've chosen to ignore ES01 errors, these are not required to be fixed.
-
remove those methods from code_checks.sh if all errors are cleared and the docstring is correct, otherwise, remove the specific error that was fixed from the list of errors for that method.
-
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
thanks @datapythonista for the inspiration for this issue!
For some reason, when I run the command on pandas.Index.str I get the following error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 3662: character maps to <undefined>
Can I be assigned to this?
Can I be assigned to this?
Of course! As Mr. Murphy said, you don't need to ask for permission, just comment which methods you will be working on
Will work on
pandas.Index.size
pandas.Index.shape
pandas.Index.ndim
will work on
pandas.Index.name
pandas.Index.dtype
pandas.Index.equals
Working on pandas.Index.map
, pandas.Index.hasnans
, pandas.Index.nbytes
,
working on pandas.Index.astype
working on pandas.DataFrame.to_parquet, pandas.DatetimeIndex.hour
working on
pandas.Index.empty
pandas.Index.T
working on
-i "pandas.Index.to_list RT03" \
-i "pandas.Index.unique RT03" \
-i "pandas.Index.item SA01" \
working on
-i "pandas.Index.fillna RT03" \
working on
-i "pandas.Index.duplicated RT03" \
-i "pandas.Index.nunique RT03" \
working on
pandas.Index.memory_usage RT03
pandas.Index.drop_duplicates RT03
Working on
-i "pandas.Index.droplevel RT03,SA01" \
-i "pandas.Index.dropna RT03,SA01" \
-i "pandas.Index.fillna RT03" \
Working on
-i "pandas.Index.inferred_type SA01" \
-i "pandas.Index.item SA01" \
-i "pandas.Index.slice_locs RT03" \
working on
-i "pandas.Index.identical PR01,SA01" \
-i "pandas.Index.value_counts RT03" \
working on
-i "pandas.Index.copy PR07,SA01" \
-i "pandas.Index.get_slice_bound PR07" \
Working on
-i "pandas.Index.append PR07,RT03,SA01" \
-i "pandas.Index.difference PR07,RT03,SA01" \
Working on
-i "pandas.Index.drop PR07,SA01" \
-i "pandas.Index.reindex PR07" \
Working on
-i "pandas.Index.insert PR07,RT03,SA01" \
-i "pandas.Index.intersection PR07,RT03,SA01" \
working on
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
-i "pandas.Index.get_indexer PR07,SA01" \
Working on
-i "pandas.Index.symmetric_difference PR07,RT03,SA01" \
-i "pandas.Index.union PR07,RT03,SA01" \
Working on
-i "pandas.Index.join PR07,RT03,SA01" \
Working on
-i "pandas.Index PR07" \
@mroeschke @jordan-d-murphy This issue is not closed yet. We need to keep it open. Following items are still remaining
-i "pandas.Index PR07" \
-i "pandas.Index.append PR07,RT03,SA01" \
-i "pandas.Index.difference PR07,RT03,SA01" \
-i "pandas.Index.get_indexer PR07,SA01" \
-i "pandas.Index.get_indexer_for PR01,SA01" \
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
-i "pandas.Index.get_loc PR07,RT03,SA01" \
-i "pandas.Index.join PR07,RT03,SA01" \
-i "pandas.Index.names GL08" \
-i "pandas.Index.putmask PR01,RT03" \
-i "pandas.Index.ravel PR01,RT03" \
-i "pandas.Index.slice_indexer PR07,RT03,SA01" \
-i "pandas.Index.str PR01,SA01" \
-i "pandas.Index.take PR01,PR07" \
-i "pandas.Index.view GL08" \
I am working on the following
-i "pandas.Index.view GL08" \
-i "pandas.Index.take PR01,PR07" \
-i "pandas.Index.slice_indexer PR07,RT03,SA01" \
I am working on the following
-i "pandas.Index.get_indexer PR07,SA01" \
-i "pandas.Index.get_indexer_for PR01,SA01" \
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
-i "pandas.Index.get_loc PR07,RT03,SA01" \
-i "pandas.Index.putmask PR01,RT03" \
workin on
-i "pandas.Index.join PR07,RT03,SA01" \
-i "pandas.Index.ravel PR01,RT03" \
-i "pandas.Index.str PR01,SA01" \
-i "pandas.Index.names GL08" \