time#


ts_next_month(ts: pd.Timestamp) pd.Timestamp[source]#
time_of_day(ts: pd.Timestamp) float[source]#
Parameters:

ts – the timestamp

Returns:

the time of day as a floating point number in [0, 24)

class TimeInterval(start: pd.Timestamp, end: pd.Timestamp)[source]#

Bases: object

contains(t: pd.Timestamp)[source]#
contains_time(t: time)[source]#
Parameters:

t – a time of day

Returns:

True iff the time interval contains the given time of day at least once, False otherwise

overlaps_with(other: TimeInterval) bool[source]#
intersection(other: TimeInterval) TimeInterval[source]#
time_delta() pd.Timedelta[source]#
mid_timestamp() pd.Timestamp[source]#
format_duration(seconds: float)[source]#