xorbits.pandas.Index.slice_locs#
- Index.slice_locs(start=None, end=None, step=None) tuple[int, int] [源代码]#
Compute slice locations for input labels.
- 参数
start (label, default None) – If None, defaults to the beginning.
end (label, default None) – If None, defaults to the end.
step (int, defaults None) – If None, defaults to 1.
- 返回类型
tuple[int, int]
参见
Index.get_loc
Get location for a single label.
提示
This method only works if the index is monotonic or unique.
实际案例
>>> idx = pd.Index(list('abcd')) >>> idx.slice_locs(start='b', end='c') (1, 3)
警告
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.