-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
BUG: Why is resampling with rule='7d' different than resampling with rule='168h'? #44996
Comments
Looks like the issue happens here: pandas/pandas/core/resample.py Lines 1656 to 1668 in 5a22750
The 7d closed=right resample hits this condition, and this code branch readjusts the bin edges (starting at line 1666). If you run in debug mode and skip over this adjustment, you get the same results in your example. Looks like this logic or similar has been there for a long time (but potentially meant to deal with Monthly/Weekly frequencies, rather than |
I'm getting the same results when using a timezone.
|
Research
I have searched the [pandas] tag on StackOverflow for similar questions.
I have asked my usage related question on StackOverflow.
Link to question on StackOverflow
https://stackoverflow.com/questions/70436514/timestamp-binning-mechanics-when-resampling
Question about pandas
Using pandas 1.3.5
The text was updated successfully, but these errors were encountered: