Reading the docs of the pandas Period
objects leaves me confused as to whether it is somehow possible to create a custom Period. By custom I mean a Period that does not follow a certain frequency dtype
but where each Period in a PeriodIndex
represents a start timestamp and an end timestamp, that is manually defined.
To illustrate:
Lets say I have n time intervals t, where the beginning and end of each interval are samples from a discrete uniformly distributed random variable with the constraint that the beginning < end.
The result would somewhat look like this:
[(ts_start0, ts_end0), (ts_start1, ts_end1), (ts_start2, ts_end2))]
Is there any way to encode such "random" intervals/ timespans/ periods with Pandas Period
or something similar?