Skip to content

to_datetime returns NaT for epoch with errors='coerce' #11758

Closed
@bhy

Description

@bhy

xref #11760

Parsing unix epoch timestamps give NaT with errors='coerce' while they can be parsed correctly without it:

>>> pd.to_datetime(1420043460, errors='coerce', unit='s')
NaT
>>> pd.to_datetime(1420043460, unit='s')
Timestamp('2014-12-31 16:31:00')

pandas: 0.17.1
numpy: 1.10.1
Python 2.7.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCompatpandas objects compatability with Numpy or Python functionsDatetimeDatetime data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions