-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: which "anchor point" for datetime properties of Periods ? #20324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
About third question, I'd say the current behavior is quite confusing. I'd even be in favor of deprecating these properties on |
Another option would be to only report these properties if they are the same for start and end date. For example, if I select a period of one hour starting from now, the |
It gets even stranger when you use a multiple of a freq:
So in this case, for the datetime properties, it discards the multiplier in the |
And another "strange" thing: for the
|
Related: #18378. |
I think we should just (deprecate) and then remove all of these properties. I think these were just carried over from Timestamp. |
Don't think these attributes can be easily deprecated. Since |
I think the Technically Correct solution would be for high-frequency attributes e.g. |
In several docstring PRs for Period datetime properties, we ran into the confusion about how the date/time of those attributes are determined (start or end ?). Eg see discussion in #20277 (comment)
Small example to illustrate:
The discussion raised from how to describe the summary of such an attribute: "The day of the month" -> but which day of the period span? -> should this be "The day of the month of the start of the Period" ? -> ah, no, because it is not always the start, it depends on the frequency.
In the above example,
M
is actually the freq string for "MonthEnd", and the datetime-properties apparently then use the end as date to calculate those properties.Questions:
freq
, what the "anchor point" is? (using anchor point here, don't know if we have existing terminology for that) A way to know if thefreq
is a "End" ?cc @jreback @jbrockmendel @sinhrks
The text was updated successfully, but these errors were encountered: