Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

drop duplicate rows pandas except nan

df[(~df.duplicated()) | (df['col'].isnull())]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #drop #duplicate #rows #pandas #nan
ADD COMMENT
Topic
Name
8+3 =