xorbits.pandas.Index.get_loc#
- Index.get_loc(key)[source]#
Get integer location, slice or boolean mask for requested label.
- Parameters
key (label) –
- Return type
int if unique index, slice if monotonic index, else mask
Examples
>>> unique_index = pd.Index(list('abc')) >>> unique_index.get_loc('b') 1
>>> monotonic_index = pd.Index(list('abbc')) >>> monotonic_index.get_loc('b') slice(1, 3, None)
>>> non_monotonic_index = pd.Index(list('abcb')) >>> non_monotonic_index.get_loc('b') array([False, True, False, True])
Warning
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.core.indexes.base.Index.