Skip to content

Commit 7257a89

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Index.putmask (#58510)
* DOC: add PR01,RT03 in pandas.Index.putmask * DOC: remove PR01,RT03 in pandas.Index.putmask
1 parent 66daafc commit 7257a89

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5260,9 +5260,19 @@ def putmask(self, mask, value) -> Index:
52605260
"""
52615261
Return a new Index of the values set with the mask.
52625262
5263+
Parameters
5264+
----------
5265+
mask : np.ndarray[bool]
5266+
Array of booleans denoting where values in the original
5267+
data are not ``NA``.
5268+
value : scalar
5269+
Scalar value to use to fill holes (e.g. 0).
5270+
This value cannot be a list-likes.
5271+
52635272
Returns
52645273
-------
52655274
Index
5275+
A new Index of the values set with the mask.
52665276
52675277
See Also
52685278
--------

0 commit comments

Comments
 (0)