Hi I have the below table:
name: col1: ... col10
a bill abc
b bill hfb
c aaa asd
a jim fsa
b aaa gds
a jim ags
I am trying to create a new table that only shows rows where 'bill' from df['col1'] hasn't shown in df['name']. So for example, bill appears in the first 2 rows and the rows with the same values in the name column as ones that correspond with occurrences with bill are removed from the df. An example output is shown below.
name: col1: ... col10
c aaa asd
I have tried this:
new_df = df[df['col1']!='bill']
But this returns:
name: col1: ... col10
c aaa asd
a jim fsa
b aaa gds
a jim ags