pandas.DatetimeIndex.indexer_between_time#

DatetimeIndex.indexer_between_time(start_time, end_time, include_start=True, include_end=True)[源代码]#

返回值在一天中的特定时间段(例如,上午9:00-9:30)的索引位置。

参数
start_time, end_time日期时间.time,字符串

时间以对象(Datetime.time)或适当格式的字符串(“%H:%M”、“%H%M”、“%I:%M%p”、“%I%M%p”、“%H:%M:%S”、“%I:%M:%S%p”、“%I%M%S%p”)传递。

include_start布尔值,默认为True
include_end布尔值,默认为True
退货
np.ndarray[np.intp]

参见

indexer_at_time

获取一天中特定时间的值的索引位置。

DataFrame.between_time

选择一天中特定时间之间的值。