Python_Select only the rows with certain condition. (Key words: Duplicates, highest score, drop, functions, select) : ID	    IP	              Score

vul1	12.345.678.01 	  5

vul2	12.345.678.01 	  7

vul3	12.345.678.01 	  10

vul4	12.345.678.02 	  7

vul5	12.345.678.02 	  10


I have a table that looks like above. I'm using python, and pandas library.
I have different rows that share same IP address. For those rows with duplicate IP addresses, I want to select only one row  with highest score (score being from 0-10), and drop all duplicates. 

Logically thinking, I need to define a function something like, 
"For rowss that share same IP address, select only one row that has highest score. Else (if ID doesn't have duplicate IP address, generate as it is (Or leave it as it is)"  

I'm having a difficult time in turning this logic into a python function. Any help will be appreciated!
