Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #rows #whith #unique #column
ADD COMMENT
Topic
Name
2+9 =