def trailing_windows(window_size=24, window_units='hours', window_count=3):
"""
Args:
window_size (int):
window_units (str):
window_count (int):
Yields:
Dict[str,str]
"""
tos, froms = tee(trailing_periods(window_size, window_units, window_count))
next(froms, None)
for to, _from in zip(tos, froms):
yield {'_from': _from, 'to': to}
评论列表
文章目录