You can use DateOffset
to achieve this:
In[88]:
df['NEW_DATE'] = df['ACC_DATE'] - pd.DateOffset(years=1)
df
Out[88]:
ACC_DATE NEW_DATE
index
538 2006-04-07 2005-04-07
550 2006-04-12 2005-04-12
More Related Contents:
- Converting between datetime, Timestamp and datetime64
- Convert pandas timezone-aware DateTimeIndex to naive timestamp, but in certain timezone
- Convert Excel style date with pandas
- Combine Date and Time columns using python pandas
- datetime dtypes in pandas read_csv
- pandas dataframe groupby datetime month
- How to convert columns into one datetime column in pandas?
- pandas out of bounds nanosecond timestamp after offset rollforward plus adding a month offset
- Find the end of the month of a Pandas DataFrame Series
- Create a day-of-week column in a Pandas dataframe using Python
- python pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- Converting between datetime and Pandas Timestamp objects
- Convert a column of datetimes to epoch in Python
- Pandas: How to create a datetime object from Week and Year?
- How to define format when using pandas to_datetime?
- pd.Timestamp versus np.datetime64: are they interchangeable for selected uses?
- pandas bar plot combined with line plot shows the time axis beginning at 1970
- Specifying date format when converting with pandas.to_datetime
- how to test if a variable is pd.NaT?
- Truncate `TimeStamp` column to hour precision in pandas `DataFrame`
- Datetime conversion – How to extract the inferred format?
- Python pandas integer YYYYMMDD to datetime
- What values are valid in Pandas ‘Freq’ tags?
- Python: Datetime to season
- How do I convert timestamp to datetime.date in pandas dataframe?
- Pandas datetimes with different formats in the same column
- Convert dates to pd.to_datetime where month could be either a number or month name
- Get weekday/day-of-week for Datetime column of DataFrame
- Plot pandas dates in matplotlib
- Pandas: select all dates with specific month and day