Using python 3.7, pandas 1.1.1
I have dataframe with datetimeindex and list of date_list =["2020-07-19", "2020-07-24", ... etc]
I want to remove all rows in my dataframe that contain dates in date_list.
My datetimeindex contains variety of hh:mm:ss as well and no matter its time I want to remove if its dates are in date_list
dataframe looks like this:
time data
2020-07-19 23:52:02 1
2020-07-20 13:44:02 1
2020-07-22 23:52:02 1
2020-07-24 08:52:02 1
2020-07-24 21:52:02 1
desired output would be:
time data
2020-07-20 13:44:02 1
2020-07-22 23:52:02 1
deleting dates in date_list
following How can I delete rows for a particular Date in a Pandas dataframe?
I've tried df.drop(pd.to_datetime("2020-07-19")) which give KeyError: "[Timestamp('2020-07-19 00:00:00')] not found in axis"
How can I remove dates without considering its time?