-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: pandas.to_datetime raises exception when more than 50 values needs coercion to NaT (#43732) #43791
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
Conversation
can you write a test |
Constructing an Index from a value that will resolve to NaT causes an error, but I'm not sure if this is by design. import datetime
import pytz
import pandas as pd
# t is a date after 2262 that should be coerced into NaT
t = datetime.datetime(3000, 1, 1, 0, 0, 0, 0, pytz.UTC)
print(pd.Index([t], tz="utc")) # pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 3000-01-01 00:00:00 |
this is expected, it is an out of bounds date. |
00104ab
to
ce90ec9
Compare
@jbrockmendel we wrote some tests, is there anything else we need to do? |
1bab61c
to
b257ccf
Compare
b257ccf
to
003c098
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code & tests look ok
but CI seems to be failing on lots of things
…ds coercion to NaT (pandas-dev#43732) Raise proper error from objects_to_datetime64ns Check for OutOfBoundsDatetime in _maybe_cache Co-authored-by: André Elimelek de Weber (andrekwr) <[email protected]> Co-authored-by: Henry Rocha (HenryRocha) <[email protected]>
Co-authored-by: André Elimelek de Weber (andrekwr) <[email protected]> Co-authored-by: Henry Rocha (HenryRocha) <[email protected]>
003c098
to
73f1633
Compare
pls merge master, but tests seem to be failing |
1 similar comment
pls merge master, but tests seem to be failing |
is worthwhile but needs to be passing (and pls merge master) |
would welcome this change but its stale. pls ping if you want to continue. |
pandas.to_datetime
raises exception when more than 50 values needs coercion to NaT #43732