Skip to content

Conversation

@jreback
Copy link
Contributor

@jreback jreback commented Apr 29, 2016

closes #11758

@jreback jreback added Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Apr 29, 2016
@jreback jreback added this to the 0.18.1 milestone Apr 29, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 29, 2016

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

@jreback jreback force-pushed the to_datetime branch 4 times, most recently from 4257b78 to f025d2a Compare April 30, 2016 16:33
.. ipython:: python

pd.to_datetime(1420043460, unit='s', errors='coerce')
pd.to_datetime(11111111, unit='D', errors='ignore')
Copy link
Member

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

jreback added a commit to jreback/pandas that referenced this pull request May 3, 2016
jreback added a commit that referenced this pull request May 3, 2016
Author: Jeff Reback <jeff@reback.net>

Closes #13059 from jreback/to_datetime3 and squashes the following commits:

6cd8e0f [Jeff Reback] BUG: More followups on to_datetime exceptions, xref #13033
yarikoptic added a commit to neurodebian/pandas that referenced this pull request Oct 13, 2016
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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

to_datetime returns NaT for epoch with errors='coerce'

2 participants