if row has multiple nan values remove them pandas code example Example: drop duplicate rows pandas except nan df[(~df.duplicated()) | (df['col'].isnull())]