-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: to_datetime when called with a unit and coerce is buggy #13033
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
@jorisvandenbossche straightforward but lots of cases. So actually what I need is a bunch more tests. Stuff like mixed float/int/string (that are integer/float-like) with some NaT's thrown in (these should pass). |
4257b78
to
f025d2a
Compare
.. ipython:: python | ||
|
||
pd.to_datetime(1420043460, unit='s', errors='coerce') | ||
pd.to_datetime(11111111, unit='D', errors='ignore') |
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.
You show the changes for errors='ignore'
and errors='coerce'
, but I think the default behaviour (for errors='raise'
) also changed? (from OverflowError to ValueError)?
Maybe good to add this case as well to the examples
Author: Jeff Reback <[email protected]> Closes #13059 from jreback/to_datetime3 and squashes the following commits: 6cd8e0f [Jeff Reback] BUG: More followups on to_datetime exceptions, xref #13033
Version 0.18.1 * tag 'v0.18.1': (96 commits) RLS: v0.18.1 DOC: update release notes BUG: More followups on to_datetime exceptions, xref pandas-dev#13033 BUG: COMPAT:0.18 added scipy version check TST: add nose import for skipped scipy tests CLN: move interpolation tests from test_generic to test_missing BUG: introduced in pandas-dev#13033 BUG: .isin(...) now coerces sets to lists COMPAT: Expand compatibility with fromnumeric.py TST: fixup codecov.yml DOC: Add tutorial link PERF: Sparse IntIndex.make_union / Numeric ops COMPAT: ensure platform it on 32-bit DOC: whatsnew fixes TST: properly handle unit='ns' and object/int arrays BUG: to_datetime when called with a unit and coerce is buggy TST: more salary.table location issues TST: move salar.table to correct url location CLN: fix up parser setup structure TST: windows compat on to_numeric tests ...
closes #11758