-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Taking a diff on datetimes yield an OverflowError (or TypeError) in pandas==2.1.0 #55080
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
I can confirm this is a bug on the main branch. I ran both test cases locally on the main branch |
Awesome, thank you for the fix! |
FYI I see a partial return of this issue in
I will be using less extreme dates for my tests, but I still prefer to let you know. The precise error is the following:
|
* Fix complex table footers * Address pytest.skip warning pytest.PytestRemovedIn8Warning: pytest.skip(msg=...) is now deprecated, use pytest.skip(reason=...) instead * Address pandas warning FutureWarning: 'S' is deprecated and will be removed in a future version, please use 's' instead. * Remove environment2.yml * Adjust the tests for pandas=2.2.0 pandas-dev/pandas#57229 pandas-dev/pandas#55080
Could this fix be ported to v1 version as well? Or is v1 completely dead at this point? |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
The following started failing one week ago, with
pandas==2.1.0
:Issue Description
Expected Behavior
Taking a difference on datetime objects should not raise any exception and return a timedelta.
I have also tried a less extreme date difference, which yields a different error:
Installed Versions
/home/marc/miniconda3/envs/itables/lib/python3.11/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
commit : ba1cccd
python : 3.11.4.final.0
python-bits : 64
OS : Linux
OS-release : 6.2.0-31-generic
Version : #31~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 16 13:45:26 UTC 2
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.1.0
numpy : 1.25.2
pytz : 2022.7
dateutil : 2.8.2
setuptools : 68.0.0
pip : 23.2.1
Cython : None
pytest : 7.4.0
hypothesis : None
sphinx : 5.0.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.12.2
pandas_datareader : None
bs4 : 4.12.2
bottleneck : 1.3.5
dataframe-api-compat: None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 11.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 2.0.20
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : 2.2.0
pyqt5 : None
The text was updated successfully, but these errors were encountered: