I am trying to subtract today's date from a column in pandas to get the number of days(as an integer).
I first converted the date's in column(ex: 27-Sep-2018) using pd.to_datetime
.
df['Date'] - datetime.datetime.now().date()
I got the following error:
TypeError: unsupported operand type(s) for -: 'DatetimeIndex' and 'datetime.date'
I am trying to figure out how to get this to work, also converting the days to integer?
df['Date'].date()
?