Skip to content

Commit 4bc05ac

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.Index.get_indexer_for (pandas-dev#58507)
* DOC: add PR01,SA01 in pandas.Index.get_indexer_for * DOC: remove PR01,SA01 in pandas.Index.get_indexer_for
1 parent 90ecd72 commit 4bc05ac

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
@@ -5934,11 +5934,23 @@ def get_indexer_for(self, target) -> npt.NDArray[np.intp]:
59345934
This dispatches to get_indexer or get_indexer_non_unique
59355935
as appropriate.
59365936
5937+
Parameters
5938+
----------
5939+
target : Index
5940+
An iterable containing the values to be used for computing indexer.
5941+
59375942
Returns
59385943
-------
59395944
np.ndarray[np.intp]
59405945
List of indices.
59415946
5947+
See Also
5948+
--------
5949+
Index.get_indexer : Computes indexer and mask for new index given
5950+
the current index.
5951+
Index.get_non_unique : Returns indexer and masks for new index given
5952+
the current index.
5953+
59425954
Examples
59435955
--------
59445956
>>> idx = pd.Index([np.nan, "var1", np.nan])

0 commit comments

Comments
 (0)