friendlysam.parts.Part.times_between¶
-
Part.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
startwhile<= 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'))