-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: Columns used in sum on 1 row dataframe depend on values instead of dtype #13912
Comments
xref #13416 |
This is a bug here: https://github.com/pydata/pandas/blob/master/pandas/core/nanops.py#L637 need to handle So we need to raise in the first case on a mixed type on axis=0. |
It appears that these examples looks reasonable now. Could use a test
|
It seems that somehow the columns used in
sum
when applied to a 1 row dataframe depend on the values in the row instead of just the dtypes. Observe:Loading that in an ipython session:
I'd expect all 3 to only use the columns
['a', 'b']
, as these are the only numeric columns. Strangely,_get_numeric_data
does return just['a', 'b']
in all cases, so it's not that.The text was updated successfully, but these errors were encountered: