During data preprocessing, it is a common task to determine the number of missing values in each column. The following code will produce a CSV file containing the number of missing values in each column of a dataframe. The name of the dataframe is 'df'.
The python file can be downloaded from here.
#*****************************************************************## Determining missing values in a dataframe# Version 1# Date: 21 March 2019#*****************************************************************#import pandas as pddfMissingInfo = df[df.columns[df.isnull().any()]].isnull().sum()dfMissingInfo.to_csv("dfMissingInfo.csv", header = False)