-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ValueError when grouping with max/min as aggregation functions (pandas-1.0.1) #32077
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 @zking1219 for the report - this used to work in 0.25.3 |
@MarcoGorelli forgot to mention it worked in |
Is this the same issue as #31802? |
Could be. I don't know why changing the number of |
I'm reasonably sure this is the same root cause as #31802. See #31802 (comment) |
I am still getting this in 1.2.4
Traceback for the same exampole
|
I tried downgrading pandas to version 1.2.3 but it doesn't work. |
This appear to work on master. Could use a test
|
Actually given the new deprecation (non numeric columns need to be de-selected before calling |
Code Sample
Problem description
Unless I've misunderstood something fundamental about the max, and min, aggregate functions, I don't think they should error out when a Series in the DataFrame is of type object and contains all but one
NaN
value. Notice from the example above that just adding one more non-NaN
value to the offending Series gets around theValueError
.Expected Output
No
ValueError
; groupby object returned.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: