-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: negating pd.Na and None
#42862
Comments
In df *-1 it defaults to NaN which is expected as None * -1 is invalid but surely it should do the same for -df. but maybe because there's no * sign DataFrame.multiply doesn't register it. So then Python kicks in and since in Python Multiplication of NaN and -1 is invalid it raises an error. |
ok, but why is |
for consistency maybe ie to make all values floats as |
It seems strange but makes sense. Sort of anyway. |
I think currently
So IMO object type data should match this and just propagate |
I agree, I think |
+1 to redefining |
To be clear on the scope here, I'm not recommending a redefinition of |
I don't really know how to describe this or if it is as expected but it seems strange behaviour to me:
I guess there are two things here:
(-df)
is not the same as(df * -1)
dtype
asobject
but the<NA>
andNone
are converted toNaN
displayThe text was updated successfully, but these errors were encountered: