get rid of dupliated values pandas python code example Example: drop duplicate rows pandas except nan df[(~df.duplicated()) | (df['col'].isnull())]