pandas check if series has nan values 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