So for simplicity purposes since my data set is very large, let's say I have a dataframe:
df = pd.DataFrame([['Foo', 'Foo1'], ['Bar', 'Bar2'], ['FooBar', 'FooBar3']],
columns= ['Col_A', 'Col_B'])
I need to filter this dataframe in a way that would eliminate an entire row when a specified column row contains a partial, non case sensitive string (foo). In this case, I tried this to no avail...PS, my regex skills are trash so forgive me if it's not working for that reason.
df = df[df['Col_A'] != '^[Ff][Oo][Oo].*']
Due to the size of my dataset, efficiency is a concern which is why I have not opted for the iteration route. Thanks in advance.