Given a pandas dataframe containing possible NaN values scattered here and there:
Question: How do I determine which columns contain NaN values? In
i use these three lines of code to print out the column names which contain at least one null value:
for column in dataframe: if dataframe[column].isnull().any(): print('{0} has {1} null values'.format(column, dataframe[column].isnull().sum()))