# pandas.Index.asof_locs¶

Index.asof_locs(where, mask)[source]

Return the locations (indices) of labels in the index.

As in the asof function, if the label (a particular entry in where) is not in the index, the latest index label up to the passed label is chosen and its index returned.

If all of the labels in the index are later than a label in where, -1 is returned.

mask is used to ignore NA values in the index during calculation.

Parameters
whereIndex

An Index consisting of an array of timestamps.