I've never worked with DataTimeIndex. It's giving me a headache as everything I normally would try is not working. I've tried converting to datetime and I'm still unable to just make a weekday column using date.weekday or .dayofweek. Can someone please assist?
date_list = pd.date_range(trainset['date'].min(), trainset['date'].max(), freq='d', name='date_val')
date_list['date_val'] = date_list['date_val'].dt.date
date_list['Weekdays'] = date_list.date_val.dt.dayofweek()