I want to drop rows from a pandas dataframe when the value of the date column is in a list of dates. The following code doesn't work:
a=['2015-01-01' , '2015-02-01']
df=df[df.datecolumn not in a]
I get the following error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().