-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
inplace where with complex column changes dtype to float #6345
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
is the same (and is implemented) like this:
their certianly could be a coercion bug in this (as this boils down to |
@hayd if you have the test frame for this example would be great (or a simple one too that reproduces) |
Sure thing:
this demonstrates for where too:
|
was basically a 1-line change (a long line!) hahah |
Following up on a later comment I left on SO (was the original question-asker of the above link), the NaN assigned is
|
no; the |
Using the frame df @hayd provided above. It works while you're operating on the dataframe, but if you use
|
The point of The values in (1,a) is missing, not a complex (or any other value) You prob want to fill it
|
The default where replace value is nan, so this is expected/correct. You should be explicit about what you want to replace it with |
OK, so long as is this correct behavior. I find it odd that Thank you both for your help, on both sites. |
I guess the distinction is between nan and inf, these concepts are different. That's why there is only one complex nan... However, I expected this to work (but not to do with pandas), weird:
|
http://stackoverflow.com/questions/21766182/replacing-out-of-bounds-complex-values-in-a-pandas-dataframe/21766586#21766586
The text was updated successfully, but these errors were encountered: