extract only year from date python

Solutions on MaxInterview for extract only year from date python by the best coders in the world

showing results for - "extract only year from date python"
Eléonore
02 Jun 2018
1df['year'] = pd.DatetimeIndex(df['date']).year