Reputation: 55
I want to remove the date in the column['DATE']
and use the quickfilter
.
I do this:
quickfilter = (df_dexu.DATE < 2018-12-1)
df_dexu=df_dexu[quickfilter]
but it gives the error message:
TypeError: invalid type comparison
Upvotes: 1
Views: 54
Reputation: 862441
Try convert column to_datetime
:
quickfilter = (pd.to_datetime(df_dexu.DATE) < '2018-12-01')
Or:
df_dexu.DATE = pd.to_datetime(df_dexu.DATE)
quickfilter = (df_dexu.DATE < '2018-12-01')
Upvotes: 2