I have the following datetime values in dask dataframe saved as string dates:
ddf = dd.DataFrame({'date': ['15JAN1955:13:15:27.369', NaN,'25DEC1990:23:18:17.200', '06MAY1962:02:55:27.360', NaN, '20SEP1975:12:02:26.357']}
I used ddf['date'].apply(lambda x: datetime.strptime(x,"%d%b%Y:%H:%M:%S.%f"), meta=datetime)
but I get a TypeError: strptime() argument 1 must be a str, not float
error.
I am following the way dates were parsed from the book: Data Science with python and dask.
Is the .%f
expecting a float? Or maybe it has something to do with NaN
values?