pandas / 1.4.0 / reference / api / pandas.index.get_slice_bound.html /

pandas.Index.get_slice_bound

Index. get_slice_bound ( label, side, kind=NoDefault.no_default ) [source]

Calculate slice bound that corresponds to given label.

Returns leftmost (one-past-the-rightmost if side=='right') position of given label.

Parameters
label :object
side :{‘left’, ‘right’}
kind :{‘loc’, ‘getitem’} or None

Deprecated since version 1.4.0.

Returns
int

Index of label.

© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.4.0/reference/api/pandas.Index.get_slice_bound.html