-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: iterrows encounters OverflowError with str and datetime64[ns] columns #35665
Comments
Thanks @allentsouhuang for the report. This appears to be a regression from 0.25.3 |
i've labeled this as timedelta because of the traceback (expand details in OP) |
This was caused by #34634 This is actually quite interesting. The first string in pandas/pandas/_libs/tslibs/timedeltas.pyx Line 334 in 020040b
So when the result is to large for the inferred frequency we get the OverflowError. For example
raises too. I am not quite sure, why we are even try to convert this to Timedelta? The previously specified unit (via the default) caused a ValueError in pandas/pandas/_libs/tslibs/timedeltas.pyx Lines 248 to 252 in 020040b
pandas/pandas/core/dtypes/cast.py Lines 1382 to 1385 in 020040b
I am not quite sure what is the intended behavior here. |
Looks like this doesn't raise an OverflowError on master anymore. Supposed this could use a test
|
take |
take |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
The error
OverflowError: Python int too large to convert to C long
. I would expect the snippet to iterate just fine without any issue.Expected Output
The snippet is not expected to show any output.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: