pandas.Index.slice_locs
pandas 3.1.1 · Index objects · method
Get the integer boundaries for a range of labels.
Call syntax
Index.slice_locs(start=None, end=None, step=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
start |
Optional Positional or keyword Default None |
label Supply the start point of a range, slice, or calculation. |
end |
Optional Positional or keyword Default None |
label Supply the endpoint of the range or calculation. |
step |
Optional Positional or keyword Default None |
int Set how many positions to advance between successive selections or windows. |
Returns
tuple[int, int]