Skip to content

DOC: fix ES01,PR07 for pandas.MultiIndex.get_loc #59364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
-i "pandas.MultiIndex.copy PR07,RT03,SA01" \
-i "pandas.MultiIndex.get_level_values SA01" \
-i "pandas.MultiIndex.get_loc PR07" \
-i "pandas.MultiIndex.get_loc_level PR07" \
-i "pandas.MultiIndex.levshape SA01" \
-i "pandas.MultiIndex.names SA01" \
Expand Down
11 changes: 8 additions & 3 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2968,14 +2968,19 @@ def _get_loc_single_level_index(self, level_index: Index, key: Hashable) -> int:

def get_loc(self, key):
"""
Get location for a label or a tuple of labels.
Get location for a label or a tuple of labels. The location is returned \
as an integer/slice or boolean mask.

The location is returned as an integer/slice or boolean
mask.
This method returns the integer location, slice object, or boolean mask
corresponding to the specified key, which can be a single label or a tuple
of labels. The key represents a position in the MultiIndex, and the location
indicates where the key is found within the index.

Parameters
----------
key : label or tuple of labels (one for each level)
A label or tuple of labels that correspond to the levels of the MultiIndex.
The key must match the structure of the MultiIndex.

Returns
-------
Expand Down
Loading