extract only year from date python

39

extract only year from date python -

df['year'] = pd.DatetimeIndex(df['date']).year

Comments

Submit
0 Comments