-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: offsets.Day should be one calendar day instead of 24 hours #20633
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
+1. As it is, Ticks are all redundant with Timedeltas. |
@mroeschke happy for you to have a look at the implications of changing this. i consolidated the other issues to this one. |
So currently It appears the main reason why |
I can't speak to the historical reasons for the design, but I know that the Tick classes have much more performant implementations of a number of methods. The easiest way to change the behavior to that suggested by the OP is to add the line |
Thanks for the tip @jbrockmendel; good enough reason to keep Tick around. I'll start exploring that avenue then. |
Regarding
|
@mroeschke would it make sense in this context to distinguish between "12h" and ".5d" as the argument to |
It would be nice to distinguish between 12 hours of absolute time and 12 hours ("0,5 days") of wall time, it seems the Pandas resampling ship has (rightly) sailed toward binning with absolute time (or would take a lot of effort to support resampling by wall time). For example:
Plus, I wouldn't know what the correct bin label would be when resampling with wall time, ( |
To summarize thoughts:
|
@mroeschke did you ever try this with setting |
I remember trying that local once but it didn't solve all cases i.e. I think either |
Closed by #22288 |
xref issues
As I understand the offset classes, they are supposed to respect transitions in "wall time" instead of absolute time. Currently the
Day
offset is currently defined to be 24 hours instead of 1 calendar day which is problematic to respect "wall time" wrt DST transitions.From prior issues, #20596, #16980, #8774, it seems like many are confused that 1 day = 24 hours when the DST transition comes up and defining 1 day = 1 calendar day would be more intuitive and consistent with other offsets. @
The text was updated successfully, but these errors were encountered: