I want to filter a pandas data frame based on exact match of a string.
I have a data frame as below
df1 = pd.DataFrame({\'vals\': [1, 2, 3, 4,5], \'i
Keeping it simple, this should work:
df1[df1['ids'] == "aball"]
You can try this:
df1[~(df1['ids'] == "aball")]
Essentially it will find all entries matching "aball" and then negate it.