Skip to content
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: Resampling to "B" frequency with closed="right" and label="right" adds empty bins #59620

Conversation

natmokval
Copy link
Contributor

@natmokval natmokval commented Aug 26, 2024

fixed bug: Resampling to frequency='B' with closed='right'a nd label='right'

@natmokval natmokval added Resample resample method Bug labels Aug 27, 2024
@natmokval natmokval marked this pull request as ready for review August 27, 2024 11:28
@natmokval
Copy link
Contributor Author

@MarcoGorelli, seems like the reproducible example was affected by the changes in your PR #55283. I corrected the definition of _get_time_bins to get the expected behavior in the example. However, this caused some of your tests to fail, so I updated the expected output. Would you mind reviewing my changes?

@mroeschke mroeschke requested a review from MarcoGorelli August 28, 2024 17:19
@MarcoGorelli
Copy link
Member

thanks for the ping, will take a look next week

Comment on lines -2176 to +2180
labels = labels[1:]
if binner.freqstr == "B":
labels = labels[1:-1]
bins = bins[0:-1]
else:
labels = labels[1:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't so clear to me - could you explain what happens here and how it fixes the issue please?

Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Oct 14, 2024
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Resampling to "B" frequency with closed="right" and label="right" adds empty bins
3 participants