I am trying to subtract a date from a date column and calculating difference in terms of months:
pd.to_datetime('2020-01-20')-pd.to_datetime(df['date'])/np.timedelta64(1,'M')
But I get
> TypeError: cannot perform __truediv__ with this index type datetimeindex
How could I correct my code in order to find the difference in months?
