pandas.MultiIndex.get_loc
pandas 3.1.1 · Index objects · method
Look up the position or positions for a supplied index key.
Call syntax
MultiIndex.get_loc(key)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
key |
Required Positional or keyword |
label or tuple of labels (one for each level) Provide the lookup key, or a transformation callable for a sorting method. |
Returns
int, slice object or boolean mask