Skip to content

Commit 7c296ea

Browse files
DOC: fix ES01,PR07 for pandas.MultiIndex.get_loc
1 parent 73b5578 commit 7c296ea

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7373
-i "pandas.MultiIndex.copy PR07,RT03,SA01" \
7474
-i "pandas.MultiIndex.get_level_values SA01" \
75-
-i "pandas.MultiIndex.get_loc PR07" \
7675
-i "pandas.MultiIndex.get_loc_level PR07" \
7776
-i "pandas.MultiIndex.levshape SA01" \
7877
-i "pandas.MultiIndex.names SA01" \

pandas/core/indexes/multi.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,14 +2968,19 @@ def _get_loc_single_level_index(self, level_index: Index, key: Hashable) -> int:
29682968

29692969
def get_loc(self, key):
29702970
"""
2971-
Get location for a label or a tuple of labels.
2971+
Get location for a label or a tuple of labels. The location is returned \
2972+
as an integer/slice or boolean mask.
29722973
2973-
The location is returned as an integer/slice or boolean
2974-
mask.
2974+
This method returns the integer location, slice object, or boolean mask
2975+
corresponding to the specified key, which can be a single label or a tuple
2976+
of labels. The key represents a position in the MultiIndex, and the location
2977+
indicates where the key is found within the index.
29752978
29762979
Parameters
29772980
----------
29782981
key : label or tuple of labels (one for each level)
2982+
A label or tuple of labels that correspond to the levels of the MultiIndex.
2983+
The key must match the structure of the MultiIndex.
29792984
29802985
Returns
29812986
-------

0 commit comments

Comments
 (0)