-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
mean over axis=1 in not-completely-numeric frame returns all nans #3689
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
linking to #3679 |
I think this is actually a confusing API,
maybe could see it raising....? |
i kind of don't like the summing strings behavior, but that's just me. here's why: just because the binary operator associated with the reduction (or fold if you are into fp) is defined doesn't mean that the reduction itself makes any sense (e.g., |
moving to 0.12; I tried to fix this but a big non-trivial |
Yeah I checked out ur dupe fix branch and tried to fix it. Didn't say anything cuz you weren't finished when I tried that, sorry. Next time I will speak up so you don't waste ur time! |
no...nothing really to do with the dups.....this is embeded in groupby....(dupe fixes are in master btw) |
@jreback is this worth fixing? this doesn't work fundamentally because of the way pandas objects are represented (as |
The annoying/inconsistent part here is that you can take the mean of a object dtype Series... |
It's because the objects here can't really be converted. Because the blocks are column wise getting the numeric data doesn't return anything |
actually i think this is easy.
by definition it will raise if its still mixed type at this point, otherwise perform the op (you might need to do slightly differently for would need a perf check too |
Problem still exists on master |
On the other hand, |
This now provides a warning, will raise in the future: |
do we have sufficient tests on the warning? |
Tests for the warnings in dataframe reductions were added in #41480 |
DataFrame from #3688. This might be related to that:
I think non numeric should be dropped...
The text was updated successfully, but these errors were encountered: