BUG: out-of-bounds datetime parsing
See original GitHub issueIn [2]: pd.__version__
Out[2]: '0.19.0+695.g2e64614'
suprisingly [2] and [3] return the same as [1] on linux-64 (meaning they don’t raise). This is from macosx. This is the correct behavior (raising).
In [1]: pd.Timestamp('01-01-01')
Out[1]: Timestamp('2001-01-01 00:00:00')
In [2]: pd.Timestamp('001-01-01')
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00
In [3]: pd.Timestamp('0001-01-01')
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
pandas out of bounds nanosecond timestamp after offset ...
The reason you are seeing this error message "OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 3000-12-23 00:00:00" is because ...
Read more >Out-Of-Bounds Read in timelib_meridian of parse_date.c
Changing related package to date/time. The issue can be triggered via function wddx_deserialize. But that's not the only way. There are other ...
Read more >pandas.to_datetime — pandas 0.23.1 documentation
Specify a date parse order if arg is str or its list-likes. If True, parses dates with the day first, eg 10/11/12 is...
Read more >How to Fix in Pandas: Out of bounds nanosecond timestamp
We receive the OutOfBoundsDatetime error because the timestamp 1/1/2300 is greater than the max nanosecond timestamp allowed by pandas. Even if ...
Read more >dask.dataframe.to_datetime - Dask documentation
When parsing a date from string fails. ValueError. When another datetime conversion error happens. For example when one of 'year', 'month', day' columns...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@justmeteomary4 the behavior in [3] you posted is correct; we expect that to raise because pandas Timestamp doesn’t support dates before 1677-09-21. If you need to represent an earlier date, use
pd.Period
.Found it:
python-dateutil==2.8.1