pandas.DatetimeIndex.indexer_at_time

DatetimeIndex.indexer_at_time(time, asof=False)[source]

Return index locations of values at particular time of day (e.g. 9:30AM).

Parameters
time:datetime.time or str

Time passed in either as object (datetime.time) or as string in appropriate format (“%H:%M”, “%H%M”, “%I:%M%p”, “%I%M%p”, “%H:%M:%S”, “%H%M%S”, “%I:%M:%S%p”, “%I%M%S%p”).

Returns
np.ndarray[np.intp]

See also

indexer_between_time

Get index locations of values between particular times of day.

DataFrame.at_time

Select values at particular time of day.

© 2008–2021, 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.3.4/reference/api/pandas.DatetimeIndex.indexer_at_time.html