df['year'] = df['date'].dt.year if we put dt.month is for month etc..
df.head()