If I use this funtion pd.DatetimeIndex(dfTrain[\'datetime\']).weekday I get number of the day, but I don\'t find any function which give the name of de day... So I
pd.DatetimeIndex(dfTrain[\'datetime\']).weekday
Using dt.weekday_name is deprecated since pandas 0.23.0, instead, use dt.day_name():
dt.weekday_name
df.datetime.dt.day_name() 0 Saturday 1 Saturday 2 Saturday 3 Saturday 4 Saturday 5 Saturday 6 Saturday 7 Saturday 8 Saturday 9 Saturday Name: datetime, dtype: object