We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
import pandas as pd pd.Timestamp('10 june 3000') >>> Timestamp('3000-06-10 00:00:00') pd.Timestamp.min, pd.Timestamp.max, pd.Timestamp.resolution >>> (Timestamp('1677-09-21 00:12:43.145224193'), Timestamp('2262-04-11 23:47:16.854775807'), Timedelta('0 days 00:00:00.000000001'))
A Timestamp object is supposed to raise an OutOfBoundsDatetime when constructed with a date outside of [pd.Timestamp.min, pd.Timestamp.max].
OutOfBoundsDatetime
[pd.Timestamp.min, pd.Timestamp.max]
I have this exception on pandas 1.5.3, but no more on pandas 2.0.0rc1
The documentation still specifies that OutOfBoundsDatetime must be raised https://pandas.pydata.org/docs/dev/user_guide/timeseries.html#timestamp-limitations
raise an OutOfBoundsDatetime exception
commit : c2a7f1a python : 3.11.0.final.0 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.19044 machine : AMD64 processor : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : fr_FR.cp1252
pandas : 2.0.0rc1 numpy : 1.23.5 pytz : 2022.7 dateutil : 2.8.2 setuptools : 65.6.3 pip : 23.0.1 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.9.2 html5lib : None pymysql : None psycopg2 : None jinja2 : 3.1.2 IPython : 8.10.0 pandas_datareader: None bs4 : 4.11.1 bottleneck : 1.3.5 brotli : fastparquet : None fsspec : None gcsfs : None matplotlib : 3.7.1 numba : None numexpr : 2.8.4 odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pyreadstat : None pyxlsb : None s3fs : None scipy : None snappy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None zstandard : None tzdata : None qtpy : None pyqt5 : None
The text was updated successfully, but these errors were encountered:
Support for non-nanosecond timestamps is new in 2.0. We'll need to update the docs there. Thanks for pointing this out.
Sorry, something went wrong.
Thanks, for the record, here is the issue that added this feature #49008
@arnaudlegout Same as #52091 I think...
Timestamp.max/min/resolution should no longer be class attributes, but instance attributes that adjust to the given resolution.
Timestamp.max/min/resolution
id be fine with that i guess. would need deprecation cycle
Yes, agree.
No branches or pull requests
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
Issue Description
A Timestamp object is supposed to raise an
OutOfBoundsDatetime
when constructed with a date outside of[pd.Timestamp.min, pd.Timestamp.max]
.I have this exception on pandas 1.5.3, but no more on pandas 2.0.0rc1
The documentation still specifies that
OutOfBoundsDatetime
must be raisedhttps://pandas.pydata.org/docs/dev/user_guide/timeseries.html#timestamp-limitations
Expected Behavior
raise an
OutOfBoundsDatetime
exceptionInstalled Versions
INSTALLED VERSIONS
commit : c2a7f1a
python : 3.11.0.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19044
machine : AMD64
processor : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : fr_FR.cp1252
pandas : 2.0.0rc1
numpy : 1.23.5
pytz : 2022.7
dateutil : 2.8.2
setuptools : 65.6.3
pip : 23.0.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.10.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : 1.3.5
brotli :
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.7.1
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : None
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: