Skip to content

Commit 9110f7c

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Index.get_loc (#58509)
* DOC: add PR07,RT03,SA01 in pandas.Index.get_loc * DOC: remove PR07,RT03,SA01 in pandas.Index.get_loc
1 parent 9250bf7 commit 9110f7c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8282
-i "pandas.DataFrame.var PR01,RT03,SA01" \
8383
-i "pandas.Grouper PR02" \
8484
-i "pandas.Index PR07" \
85-
-i "pandas.Index.get_loc PR07,RT03,SA01" \
8685
-i "pandas.Index.join PR07,RT03,SA01" \
8786
-i "pandas.Index.names GL08" \
8887
-i "pandas.Index.ravel PR01,RT03" \

pandas/core/indexes/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,10 +3490,22 @@ def get_loc(self, key):
34903490
Parameters
34913491
----------
34923492
key : label
3493+
The key to check its location if it is present in the index.
34933494
34943495
Returns
34953496
-------
34963497
int if unique index, slice if monotonic index, else mask
3498+
Integer location, slice or boolean mask.
3499+
3500+
See Also
3501+
--------
3502+
Index.get_slice_bound : Calculate slice bound that corresponds to
3503+
given label.
3504+
Index.get_indexer : Computes indexer and mask for new index given
3505+
the current index.
3506+
Index.get_non_unique : Returns indexer and masks for new index given
3507+
the current index.
3508+
Index.get_indexer_for : Returns an indexer even when non-unique.
34973509
34983510
Examples
34993511
--------

0 commit comments

Comments
 (0)