Skip to content

What about using Periods instead of Timestamp ? #3

@antoinetavant

Description

@antoinetavant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions