I have a dataframe which looks like this
Label Type
Name
ppppp Base brute UnweightedBase
pbaaa Base Base
pb4a1 Très à gauche Category
pb4a2 A gauche pb4a2 Category
pb4a3 Au centre pb4a3 Category
pb4a4 A droite pb4a4 Category
if "Type" column's value is "UnweightedBase" and "Base", I would like that delete from the data.
I can do this but just for one item at a time with the following code:
to_del = df[df['Type'] == "UnweightedBase"].index.tolist()
df= df.drop(to_del, axis)
return df
How do I modify my code so that I can delete more than one value at once?
my failed attempt:
to_del = df[df['Type'] in ["UnweightedBase","Base"]].index.tolist()
df= df.drop(to_del, axis)
return df