friendlysam.parts.Cluster.times_between¶
-
Cluster.
times_between
(start, end)¶ Get a tuple of all times between two points.
See also:
times_between()
,iter_times()
,times()
.Takes one time step at a time from
start
while<= end
. This works exactly likeiter_times_between()
, but returns a tuple.Parameters: - start (any object) – The index to start from.
- end (any object) – The index to go to.
Note
This function only works if times are orderable, or specifically that the
<=
operator is implemented.Examples
>>> from pandas import Timestamp, Timedelta >>> part = Part() >>> part.time_unit = Timedelta('7 days') >>> start, end = Timestamp('2011-02-14'), Timestamp('2011-02-28') >>> part.times_between(start, end) (Timestamp('2011-02-14 00:00:00'), Timestamp('2011-02-21 00:00:00'), Timestamp('2011-02-28 00:00:00'))