to detect if a data frame has nan values
> df.isnull().any().any() True
Source: stackoverflow.com
to detect if a data frame has nan values
df.isnull().sum().sum() 5
Source: stackoverflow.com