-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: df.resample('MS', closed='right') incorrectly places bins #55283
BUG: df.resample('MS', closed='right') incorrectly places bins #55283
Conversation
bs = s.resample("B", closed="right", label="right").mean() | ||
result = bs.resample("8H").mean() | ||
assert len(result) == 22 | ||
assert len(result) == 25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MarcoGorelli |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
thanks ah I put the wrong milestone, this should've just gone into 2.2 as it's just a regression since main, rather than since 2.1 will fixup the whatsnew entry later |
@MarcoGorelli ping on the whatsnews, they cause merge conflicts on all back ports |
here you go, sorry for the delay #55309 |
* Port fix from pandas-dev/pandas#55283 to cftime resample [test-upstream] * Skip test for pandas versions older than 2.2 [test-upstream] * Update doc/whats-new.rst Co-authored-by: Justus Magin <[email protected]> --------- Co-authored-by: Deepak Cherian <[email protected]> Co-authored-by: Justus Magin <[email protected]>
closed
andlabel
? #55282doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.todo: extra tests for 'B' with closed ='right' (linked issue below), whatsnewThis fixes a regression from 2.1.0 - but, it also happens to fix two older bugs as a side-effect. So, I've put this in the 2.1.2 milestone