python pandas using row determine if the value is NAN code example
Example 1: to detect if a data frame has nan values
> df.isnull().any().any()
True
Example 2: to detect if a data frame has nan values
df.isnull().sum().sum()
5
> df.isnull().any().any()
True
df.isnull().sum().sum()
5