pandas.Index.get_loc — pandas 0.24.0rc1 documentation (original) (raw)

key : label

method : {None, ‘pad’/’ffill’, ‘backfill’/’bfill’, ‘nearest’}, optional

tolerance : optional

Maximum distance from index value for inexact matches. The value of the index at the matching location most satisfy the equationabs(index[loc] - key) <= tolerance.

Tolerance may be a scalar value, which applies the same tolerance to all values, or list-like, which applies variable tolerance per element. List-like includes list, tuple, array, Series, and must be the same size as the index and its dtype must exactly match the index’s type.

New in version 0.21.0: (list-like tolerance)