I am trying to drop a row with mutiple string patterns from a csv file a single pattern works but when adding another pattern it doesn’t work and does nothing to the file
ols = df[df["Risk"].str.contains("Not") == False] this works
ols = df[df["Risk"].str.contains("Not | yes") == False] this doesn’t work
>Solution :
IIUC remove spaces in "Not|yes", for compare with False invert mask by ~:
df[~df["Risk"].str.contains("Not|yes")]