PeriodIndex¶
- class Sloth.index.PeriodIndex¶
Index containing values of time along a regular period of time.
Parameters¶
- start: datetime-like
Starting time in a range
- stop: datetime-like
End time in the range
- freq: str
How often to create point. ie: ‘1h’, ‘4W’, ‘200s’
Examples¶
>>> idx = PeriodIndex('2022-01-01', '2022-01-10', '1d') >>> idx.keys_ array(['2022-01-01', '2022-01-02', '2022-01-03', '2022-01-04', '2022-01-05', '2022-01-06', '2022-01-07', '2022-01-08', '2022-01-09'], dtype='datetime64[D]')