I have a df where I'd like to filter the table by a single date column, specifically dates that are within 1 year of today.
I've tried the following with no luck:
df[df['latest start date'] > (date.today() + timedelta(weeks=-52))]
The error message I get is:
TypeError: '>' not supported between instances of 'str' and 'datetime.date'
Any help would be greatly appreciated.
datetime:df['latest start date'] = pd.to_datetime(df['latest start date'] )before that line.