-
Notifications
You must be signed in to change notification settings - Fork 0
What about using Periods instead of Timestamp ? #3
Description
From the pandas documentation:
The time period represented (e.g., ‘4Q2005’). This represents neither the start or the end of the period, but rather the entire period itself.
As the current datetime index uses timestamp to represent the start of the period over which the value is provided, assuming that it would end at the next index value, using this Period could allow to better represent the fact that the value is provided over a period of time, and not one instant.
However, I'm not sure how the resampling functions would work like that.
In addition, it looks like the frequency needs to be the same for every period.
Maybe, it would be preferred to manage our own period information by using a "duration" column. Hence, the index would be the start of the period, and this duration value would be the actual duration of the period, without the need to assume the end of the period to be the start of the next period.