Answers for "how to show all rows whith a unique value in a column"

0

how to show all rows whith a unique value in a column

df = df.drop_duplicates('COL2')
#same as
#df = df.drop_duplicates('COL2', keep='first')
print (df)
    COL1  COL2
0  a.com    22
1  b.com    45
2  c.com    34
4  f.com    56
Posted by: Guest on May-04-2022

Code answers related to "how to show all rows whith a unique value in a column"

Browse Popular Code Answers by Language