I want to convert the DatetimeIndex in my DataFrame to float format,which can be analysed in my model.Could someone tell me how to do it? Do I need to use date2num()functio
I found another solution:
df['date'] = df['date'].astype('datetime64').astype(int).astype(float)