I have a datetime column as below -
>>> df['ACC_DATE'].head(2)
538 2006-04-07
550 2006-04-12
Name: ACC_DATE, dtype: datetime64[ns]
Now, I want to subtract an year from each row of this column. How can I achieve the same & which library can I use?
The expected field -
ACC_DATE NEW_DATE
538 2006-04-07 2005-04-07
549 2006-04-12 2005-04-12
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…