question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: out-of-bounds datetime parsing

See original GitHub issue
In [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:closed
  • Created 6 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jbrockmendelcommented, Mar 13, 2019

@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.

0reactions
dair-targcommented, Apr 30, 2020

Found it: python-dateutil==2.8.1

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found