python drop 1 row if nans are together code example
Example 1: drop duplicate rows pandas except nan
df[(~df.duplicated()) | (df['col'].isnull())]
Example 2: remove rows or columns with NaN value
df.dropna() #drop all rows that have any NaN values
df.dropna(how='all')