-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pd.to_numeric(series, downcast='integer') does not prpoerly handle floats over 10,000 #14941
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
so this is correct, it is effectively doing an @gfyoung thoughts |
Just so I am clear, this is the behavior expected? Not this?
|
hmm, this looks buggy. if you want to have a look see inside and see what's going on would be great. |
@jreback I will try - I am sort of new to this. Is this the module I should be looking at? |
yes |
@gryBox : First of all, thanks for pointing this out! If you follow the code from where you started, the bug traces here. You can see here yourself: >>> import numpy as np
>>>
>>> arr = [1000000]
>>> arr2 = [1000000.5]
>>>
>>> np.allclose(arr, arr2) # This is what we do now
True
>>> np.allclose(arr, arr2, rtol=0) # This is what we probably should do
False I think if passing |
@gryBox : I'm not sure there is such a method. Also, |
Hi - I came across this issue in stackoverflow while testing pd.to_numeric()
This doesn't seem like the desired behavior.
The text was updated successfully, but these errors were encountered: