I'm getting an error
'str' object has no attribute 'strftime'
from this code of mine:
from datetime import datetime, date
analysis_dataframe.loc[:,'order_period'] = analysis_dataframe.date.apply(lambda x: x.strftime('%Y-%m'))
analysis_dataframe.head(10)
and I have a column "date" with dates in format like that:
How can I fix this error?
Thank you
