-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix bug in to_datetime that occasionally throws FloatingPointErr… #61022
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
Conversation
…or when called on a float array with missing values
Thanks @snitish |
Pandas v.2.2.3, the bug is still there. I am processing a pd.Series filled with float timestamps. Overflows while More details: |
@vgolskiy yes, the fix will be released with 3.0 (unless this gets backported to the 2.3.x branch) |
What workaround is recommended until pandas 3 is released? |
@RyuuOujiXS you can call |
@snitish , so it was the NaN value that was causing overflow? Also, after removing NaNs, it is better to return NaTs as the data will have a |
…or when called on a float array with missing values
FloatingPointError: overflow encountered in multiply
in the following sequence: read_csv followed by to_datetime with pandas version 2.2.2 #58419doc/source/whatsnew/v3.0.0.rst
file if fixing a bug or adding a new feature.The cause of the error is a numpy array created via np.empty(). Sometimes it contains garbage values which subsequently get passed to
np.round
causing errors.