I am trying to delete rows in my dataframe if it contains something from my list.
DF
Search_List = ['drunk', 'owner']
df = df[~df['Searches'].str.contains('|'.join(Search_List))]
Searches
the person was Drunk
the owner was not available
This is a test
The Owner was not in
Current Result:
Searches
the person was Drunk
This is a test
The Owner was not in
Expected Result:
Searches
This is a test
is there a way to conduct the search but allow it to match even if it is upper cases etc? I am unable to convert it to lower and then do the search as it breaks the other functions i have in the script. Is there an easy solution for this?