Given a pandas dataframe containing possible NaN values scattered here and there:
Question: How do I determine which columns contain NaN values? In
You can use df.isnull().sum(). It shows all columns and the total NaNs of each feature.
df.isnull().sum()