-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Confusing - rolling min( ) function "accepting" objects #20244
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
Comments
Thanks for the report! This is certainly a bug, as it is not even calculating a minimum for the numerical values. Didn't look in detail, but I suppose this is due to the automatic skipping of non-numerical columns.
but in case of a Series, just passing it through makes less sense. |
This is working fine on master >>> pd.DataFrame({'a': [1,2,3,4], 'b':[1,2,'a', 'b']}).rolling(2).min()
a
0 NaN
1 1.0
2 2.0
3 3.0 >>> s = pd.Series([3,1,2,'x','y','z'])
>>> s.rolling(2).min()
Traceback (most recent call last):
...
pandas.core.base.DataError: No numeric types to aggregate |
#27044 was just merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Code Sample, a copy-pastable example if possible
Problem description
Should raise an exception because the series contains objects. Instead, function returns the series.
The text was updated successfully, but these errors were encountered: