Ao reproduzir as linhas de código abaixo:
df_sp['mes'] = pd.to_datetime(df_sp['data'])
df_sp['dia_da_semana'] = df_sp['mes'].dt.weekday_name
df_sp.head()
apresentou a seguinte mensagem:
AttributeError Traceback (most recent call last)
ipython-input-35-da97f245a64c in module
1 df_sp['mes'] = pd.to_datetime(df_sp['data'])
----> 2 df_sp['dia_da_semana'] = df_sp['mes'].dt.weekday_name
3 df_sp.head()
AttributeError: 'DatetimeProperties' object has no attribute 'weekday_name'