Return index locations of values at particular time of day.
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”).
See also
indexer_between_timeGet index locations of values between particular times of day.
DataFrame.at_timeSelect values at particular time of day.
Examples
>>> idx = pd.DatetimeIndex(["1/1/2020 10:00", "2/1/2020 11:00",
... "3/1/2020 10:00"])
>>> idx.indexer_at_time("10:00")
array([0, 2])
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.DatetimeIndex.indexer_at_time.html