A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.indexer_between_time.html below:

pandas.DatetimeIndex.indexer_between_time — pandas 2.3.1 documentation

pandas.DatetimeIndex.indexer_between_time#
DatetimeIndex.indexer_between_time(start_time, end_time, include_start=True, include_end=True)[source]#

Return index locations of values between particular times of day.

Parameters:
start_time, end_timedatetime.time, str

Time passed 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”).

include_startbool, default True
include_endbool, default True
Returns:
np.ndarray[np.intp]

Examples

>>> idx = pd.date_range("2023-01-01", periods=4, freq="h")
>>> idx
DatetimeIndex(['2023-01-01 00:00:00', '2023-01-01 01:00:00',
                   '2023-01-01 02:00:00', '2023-01-01 03:00:00'],
                  dtype='datetime64[ns]', freq='h')
>>> idx.indexer_between_time("00:00", "2:00", include_end=False)
array([0, 1])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4