-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateTimedeltaTimedelta data typeTimedelta data type
Milestone
Description
In [1]: Series(['2011-01-01', np.nan]).apply(pd.to_datetime)
Out[1]:
0 2011-01-01 00:00:00
1 NaT
dtype: datetime64[ns]
In [2]: Series(['00:00:01', np.nan]).apply(pd.to_timedelta)
AssertionError: Invalid type for timedelta scalar: <type 'float'>
May not be a trivial fix. So far I have seen that inserting np.nan and pd.tslib.iNaT into the result turns the dtype to object, which is no good.
Metadata
Metadata
Assignees
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateTimedeltaTimedelta data typeTimedelta data type