0

I currently have a DataFrame with 3 columns: SLR, NAME and OID, which looks something like this:

SLR  NAME  OID 
5    A     1   
5    B     2   
6    A     1   
6    B     2   
7    A     1   
7    B     2   
7    C     3  

What I am trying to do is delete/drop any rows where NAME and OID match, and where the one that is kept has the lowest SLR value. Using the above table, the result should look something like:

  SLR  NAME  OID 
    5    A     1   
    5    B     2        
    7    C     3  

I've searched all over and messed around with the df.drop_duplicates() commands, but haven't gotten anywhere. Any ideas?

Jared
  • 117
  • 4

0 Answers0