Skip to content

Commit

Permalink
DOC: Enforce Numpy Docstring Validation for pandas.Index.putmask (#58510
Browse files Browse the repository at this point in the history
)

* DOC: add PR01,RT03 in pandas.Index.putmask

* DOC: remove PR01,RT03 in pandas.Index.putmask
  • Loading branch information
tuhinsharma121 committed May 1, 2024
1 parent 66daafc commit 7257a89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-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.str PR01,SA01" \
-i "pandas.Int16Dtype SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5260,9 +5260,19 @@ def putmask(self, mask, value) -> Index:
"""
Return a new Index of the values set with the mask.
Parameters
----------
mask : np.ndarray[bool]
Array of booleans denoting where values in the original
data are not ``NA``.
value : scalar
Scalar value to use to fill holes (e.g. 0).
This value cannot be a list-likes.
Returns
-------
Index
A new Index of the values set with the mask.
See Also
--------
Expand Down

0 comments on commit 7257a89

Please sign in to comment.