pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DOC: Enforce Numpy Docstring Validation | pandas.Index

Open jordan-d-murphy opened this issue 10 months ago • 28 comments

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:

  1. take 1-5 methods

  2. 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
  1. 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.

  2. 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.

  3. 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!

jordan-d-murphy avatar Mar 29 '24 07:03 jordan-d-murphy

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>

Aloqeely avatar Mar 31 '24 00:03 Aloqeely

Can I be assigned to this?

sunwooma avatar Apr 03 '24 20:04 sunwooma

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

Aloqeely avatar Apr 03 '24 22:04 Aloqeely

Will work on

pandas.Index.size
pandas.Index.shape
pandas.Index.ndim

KeiOshima avatar Apr 19 '24 02:04 KeiOshima

will work on

pandas.Index.name
pandas.Index.dtype 
pandas.Index.equals

KeiOshima avatar Apr 20 '24 16:04 KeiOshima

Working on pandas.Index.map, pandas.Index.hasnans, pandas.Index.nbytes,

shriyakalakata avatar Apr 20 '24 20:04 shriyakalakata

working on pandas.Index.astype

Nrezhang avatar Apr 21 '24 16:04 Nrezhang

working on pandas.DataFrame.to_parquet, pandas.DatetimeIndex.hour

sunwooma avatar Apr 21 '24 17:04 sunwooma

working on

pandas.Index.empty 
pandas.Index.T

KeiOshima avatar Apr 22 '24 19:04 KeiOshima

working on

-i "pandas.Index.to_list  RT03" \
-i "pandas.Index.unique RT03" \ 
-i "pandas.Index.item SA01" \ 

tuhinsharma121 avatar Apr 24 '24 07:04 tuhinsharma121

working on

-i "pandas.Index.fillna RT03" \ 

tuhinsharma121 avatar Apr 25 '24 06:04 tuhinsharma121

working on

 -i "pandas.Index.duplicated RT03" \ 
 -i "pandas.Index.nunique RT03" \ 

KeiOshima avatar Apr 25 '24 19:04 KeiOshima

working on

pandas.Index.memory_usage RT03
pandas.Index.drop_duplicates RT03

KeiOshima avatar Apr 25 '24 19:04 KeiOshima

Working on

-i "pandas.Index.droplevel RT03,SA01" \
-i "pandas.Index.dropna RT03,SA01" \
-i "pandas.Index.fillna RT03" \

shriyakalakata avatar Apr 25 '24 19:04 shriyakalakata

Working on

-i "pandas.Index.inferred_type SA01" \
-i "pandas.Index.item SA01" \
-i "pandas.Index.slice_locs RT03" \

shriyakalakata avatar Apr 25 '24 20:04 shriyakalakata

working on

 -i "pandas.Index.identical PR01,SA01" \ 
 -i "pandas.Index.value_counts RT03" \ 

KeiOshima avatar Apr 25 '24 20:04 KeiOshima

working on

 -i "pandas.Index.copy PR07,SA01" \ 
 -i "pandas.Index.get_slice_bound PR07" \ 

KeiOshima avatar Apr 26 '24 15:04 KeiOshima

Working on

 -i "pandas.Index.append PR07,RT03,SA01" \ 
 -i "pandas.Index.difference PR07,RT03,SA01" \ 

shriyakalakata avatar Apr 27 '24 15:04 shriyakalakata

Working on

 -i "pandas.Index.drop PR07,SA01" \ 
 -i "pandas.Index.reindex PR07" \ 

shriyakalakata avatar Apr 27 '24 16:04 shriyakalakata

Working on

 -i "pandas.Index.insert PR07,RT03,SA01" \ 
 -i "pandas.Index.intersection PR07,RT03,SA01" \ 

shriyakalakata avatar Apr 27 '24 16:04 shriyakalakata

working on

 -i "pandas.Index.get_indexer_non_unique PR07,SA01" \ 
-i "pandas.Index.get_indexer PR07,SA01" \

KeiOshima avatar Apr 27 '24 16:04 KeiOshima

Working on

 -i "pandas.Index.symmetric_difference PR07,RT03,SA01" \ 
 -i "pandas.Index.union PR07,RT03,SA01" \

shriyakalakata avatar Apr 27 '24 16:04 shriyakalakata

Working on

 -i "pandas.Index.join PR07,RT03,SA01" \ 

shriyakalakata avatar Apr 29 '24 01:04 shriyakalakata

Working on

-i "pandas.Index PR07" \

aBiR1D avatar Apr 29 '24 20:04 aBiR1D

@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" \

tuhinsharma121 avatar Apr 30 '24 03:04 tuhinsharma121

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" \

tuhinsharma121 avatar Apr 30 '24 06:04 tuhinsharma121

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" \

tuhinsharma121 avatar Apr 30 '24 18:04 tuhinsharma121

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" \

tuhinsharma121 avatar May 02 '24 18:05 tuhinsharma121