open_in_new
content_copy
df['month']=df['purchase_date'].apply(lambda x : x.replace(day=1))