Skip to content

Commit d276709

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Index.get_indexer_for (#58507)
* DOC: add PR01,SA01 in pandas.Index.get_indexer_for * DOC: remove PR01,SA01 in pandas.Index.get_indexer_for
1 parent 8cc036c commit d276709

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8484
-i "pandas.DataFrame.var PR01,RT03,SA01" \
8585
-i "pandas.Grouper PR02" \
8686
-i "pandas.Index PR07" \
87-
-i "pandas.Index.get_indexer_for PR01,SA01" \
8887
-i "pandas.Index.get_loc PR07,RT03,SA01" \
8988
-i "pandas.Index.join PR07,RT03,SA01" \
9089
-i "pandas.Index.names GL08" \

pandas/core/indexes/base.py

+12
Original file line numberDiff line numberDiff line change
@@ -5953,11 +5953,23 @@ def get_indexer_for(self, target) -> npt.NDArray[np.intp]:
59535953
This dispatches to get_indexer or get_indexer_non_unique
59545954
as appropriate.
59555955
5956+
Parameters
5957+
----------
5958+
target : Index
5959+
An iterable containing the values to be used for computing indexer.
5960+
59565961
Returns
59575962
-------
59585963
np.ndarray[np.intp]
59595964
List of indices.
59605965
5966+
See Also
5967+
--------
5968+
Index.get_indexer : Computes indexer and mask for new index given
5969+
the current index.
5970+
Index.get_non_unique : Returns indexer and masks for new index given
5971+
the current index.
5972+
59615973
Examples
59625974
--------
59635975
>>> idx = pd.Index([np.nan, "var1", np.nan])

0 commit comments

Comments
 (0)