-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: resample by BusinessHour raises ValueError #13364
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
Conversation
Current coverage is 84.23%@@ master #13364 diff @@
==========================================
Files 138 138
Lines 50724 50727 +3
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42726 42729 +3
Misses 7998 7998
Partials 0 0
|
@@ -2297,6 +2297,17 @@ def test_upsample_daily_business_daily(self): | |||
expected = ts.asfreq('H', how='s').reindex(exp_rng) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_resample_hourly_business_hourly(self): | |||
ts = pd.Series(index=pd.date_range(start='2016-06-01 03:00:00', |
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.
add the issue number here as a comment
can you update |
elif isinstance(offset, BusinessHour): | ||
# GH12351 - normalize BH freq leads ValueError | ||
first = Timestamp(offset.rollback(first)) | ||
last = Timestamp(offset.rollforward(last + offset)) |
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.
isn't rollback
/rollforward
returns Timestamp
?
@scari Do you have time to rebase and update this? |
can you rebase / update? |
can you rebase and move release notes to 0.19.2 |
can you rebase / move whatsnew to 0.20.0 |
closing as stale |
TestPeriodIndex.test_resample_hourly_business_hourly
)git diff upstream/master | flake8 --diff
I did this during pandas sprint at PyCon 2016. Hope this close #12351
Resampling with BusinessHour took much more consideration I guess.
Please review this. Any comments are welcome.