-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
AssertionError with df.resample(how="median") #1688
Comments
I have no idea what numpy is up to, though:
I can't seem to make it misbehave here, but with some Actual Data with data absent for several of the resampled intervals, I can get numpy to explode with the same stack trace as: np.percentile([], 50)
# ...
# ValueError: operands could not be broadcast together with shapes (0) (2) I can certainly work around that in the lambda by short-circuiting on an empty list-like thing being passed in, but I don't think I should have to. For this particular case, I can just do this with expected results:
I can't fathom why Thanks! |
thanks for the test case. fixed the underlying cause |
Awesome, glad it helped. Thanks for fixing it! :) When trying to learn numpy/pandas concepts, sometimes it's hard to tell user error from a True bug. :) |
I've reproduced something using
how="median"
, perhaps #1648. It seems to hit when there are discontinuities in the resampling (i.e. minutes with no records when downsampling).Both pandas 0.8.1 and 0.8.2.dev-f5a74d4 don't like it:
The text was updated successfully, but these errors were encountered: