Skip to content

Commit 8718643

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.Index.putmask (pandas-dev#58510)
* DOC: add PR01,RT03 in pandas.Index.putmask * DOC: remove PR01,RT03 in pandas.Index.putmask
1 parent cb9a9f9 commit 8718643

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9191
-i "pandas.Index.get_loc PR07,RT03,SA01" \
9292
-i "pandas.Index.join PR07,RT03,SA01" \
9393
-i "pandas.Index.names GL08" \
94-
-i "pandas.Index.putmask PR01,RT03" \
9594
-i "pandas.Index.ravel PR01,RT03" \
9695
-i "pandas.Index.str PR01,SA01" \
9796
-i "pandas.Int16Dtype SA01" \

pandas/core/indexes/base.py

+10
Original file line numberDiff line numberDiff line change
@@ -5241,9 +5241,19 @@ def putmask(self, mask, value) -> Index:
52415241
"""
52425242
Return a new Index of the values set with the mask.
52435243
5244+
Parameters
5245+
----------
5246+
mask : np.ndarray[bool]
5247+
Array of booleans denoting where values in the original
5248+
data are not ``NA``.
5249+
value : scalar
5250+
Scalar value to use to fill holes (e.g. 0).
5251+
This value cannot be a list-likes.
5252+
52445253
Returns
52455254
-------
52465255
Index
5256+
A new Index of the values set with the mask.
52475257
52485258
See Also
52495259
--------

0 commit comments

Comments
 (0)