maxim5/time-series-machine-learning

TypeError: dtype '<type 'datetime.datetime'>' not understood

renelikestacos opened this issue · 2 comments

Hi @maxim5 i tried to run your code,

fetching (run_fetch.py) the data worked but it failed afterwards at running the training (run_train.py) with the error

TypeError: dtype '<type 'datetime.datetime'>' not understood

Do you know about it? I tried to fix it in the to_changes function but I just drag another error with me. It seems that converting the date/time fields are not working anymore.

in module 'data_util.py' row 27:
#'time': raw.date.astype(datetime.datetime).apply(lambda val: seconds(val) / (606024)),
'time': raw.date.astype('datetime64[ns]').apply(lambda val: seconds(val) / (606024)),

Thanks @andrewpol777 you're right, this is more robust.