0

This is a subset of a dataframe:

index  drug_id     values
1      le.1         f
2      le.7         h
3      le.10        9
4      le.11        10
5      le.15        S

I am going to remove rows that values in the drug_id column are: le.7, le.10, le.11. This is my code:

df.drop(df.drug_id[['le.7', 'le.10', 'le.11']], inplace = True )

I also tried this:

df.drop(df.drug_id == ['le.7', 'le.10', 'le.11'], inplace = True )

But none of them worked. Any suggestion ?

Mary
  • 1,142
  • 1
  • 16
  • 37

0 Answers0