问题描述
df['Feedback Year']= df['Feedback Date'].strftime("%B")
错误:
AttributeError: 'Series' object has no attribute 'strftime'
1楼
尝试:
df['Feedback Year']= df['Feedback Date'].dt.strftime("%B")
或者
df['Feedback Year']= df['Feedback Date'].apply(lambda x: x.strftime('%B'))