From 55f19475c10b0dc93c344e4a2e2104a682498007 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Wed, 1 May 2024 11:10:42 +0530 Subject: [PATCH 1/2] DOC: add PR07,RT03,SA01 in pandas.Index.get_loc --- pandas/core/indexes/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 054f522e7a37b..7f27b937ea5d6 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -3490,10 +3490,22 @@ def get_loc(self, key): Parameters ---------- key : label + The key to check its location if it is present in the index. Returns ------- int if unique index, slice if monotonic index, else mask + Integer location, slice or boolean mask. + + See Also + -------- + Index.get_slice_bound : Calculate slice bound that corresponds to + given label. + Index.get_indexer : Computes indexer and mask for new index given + the current index. + Index.get_non_unique : Returns indexer and masks for new index given + the current index. + Index.get_indexer_for : Returns an indexer even when non-unique. Examples -------- From 524c1090e92b3b4419c9af7db062e0208029024e Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Wed, 1 May 2024 11:11:39 +0530 Subject: [PATCH 2/2] DOC: remove PR07,RT03,SA01 in pandas.Index.get_loc --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f49bfb1581332..e71ece55a2323 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -90,7 +90,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.get_indexer PR07,SA01" \ -i "pandas.Index.get_indexer_for PR01,SA01" \ -i "pandas.Index.get_indexer_non_unique PR07,SA01" \ - -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" \