-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Resample across multiple days #8941
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: Resample across multiple days #8941
Conversation
@hkleynhans I think test_resample.py is a better place to put the test (https://github.com/hkleynhans/pandas/blob/fix/8683_resample_value_error/pandas/tseries/tests/test_resample.py) |
|
||
foffset = (first.value - start_day_nanos) % offset.nanos | ||
loffset = (last.value - last_day_nanos) % offset.nanos | ||
|
||
loffset = (last.value - start_day_nanos) % offset.nanos |
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.
very small nitpick, but can you keep the blank line after this to keep the visual blocks
e6531c8
to
2b77f51
Compare
Fixes an issue where resampling over multiple days causes a ValueError when a number of days between the normalized first and normalized last days is not a multiple of the frequency. Added test TestResample.test_resample_anchored_multiday Closes pandas-dev#8683
2b77f51
to
5a2b19b
Compare
Thanks for the feedback. The issues have been addressed. |
@jreback can you have a look at this? (or is there someone with great knowledge of the resample code?) But the change seems logic, and the tests pass |
will have a look |
looks good. @jorisvandenbossche merge on green. |
@hkleynhans Thanks a lot! It was nice debugging |
BUG: Resample across multiple days
Fixes an issue where resampling over multiple days causes a ValueError
when a number of days between the normalized first and normalized last
days is not a multiple of the frequency.
Added test TestSeries.test_resample
Closes #8683