I have created multiple filters for a Dataframe:
filt1 = ~df["message"].str.contains("<Media omitted>", na=False),
filt2 = ~df["message"].str.contains("http://", na=False),
filt3 = ~df["message"].str.contains("Dropped pin", na=False),
I can filter the dataframe using:
df[filt1 & filt2 & filt3]
But as I add more filters this seems like a stupid way to filter. How do I apply multiple filters to a dataframe?
I tried adding each filter to a list doing df[filterlist]
and df[*filterlist]
but these do not work.