Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: penggunaan fromkeys di python 
Python :: first index of an integer less than a value 
Python :: get primary key in get_context_data 
Python :: how to initialize a token spacy python 
Python :: call a Python range() using range(start, stop) 
Python :: print python age input 
Python :: python special methods list 
Python :: ccacxc 
Python :: Python script to download all images from a website to a specified folder with BeautifulSoup 
Python :: python selectionsort 
Python :: dnpy notify 
Python :: operasi tipe data integer 
Python :: changing labels of facetgrid 
Python :: how do i add two matrix and store it in a list in python 
Python :: 405 Method Not Allowed When Redirecting in Flask within POST route 
Python :: Python beginner question - trying to understand return statement 
Python :: Python 3 (python 3.7.3) sample 
Python :: python static 
Python :: element tree no able to find tag 
Python :: plt datas use left and right yaxes 
Python :: python graph 
Python :: All objects and constants needed to use the ldap3 library can be imported from the ldap3 namespace 
Python :: matplotlib doesnt show suptitle 
Python :: pandas to sql arabic 
Python :: Print the multiple data types in a single program in list data structures 
Python :: django how to create superuser if does not exists on migration 
Python :: how to resolve This typically means that you attempted to use functionality that needed an active HTTP request. Consult the documentation on testing for information about how to avoid this problem. in thread python 
Python :: pandas select rows by condition in list 
Python :: how to add trailing zeros in the number 
Python :: rename column in dataframe 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =