1#Python, pandas
2#Count missing values for each column of the dataframe df
3
4df.isnull().sum()
5
1# Count total missing values in a dataframe
2
3df.isnull().sum().sum()
4
5# Gives a integer value
1In [5]: df = pd.DataFrame({'a':[1,2,np.nan], 'b':[np.nan,1,np.nan]})
2
3In [6]: df.isna().sum()
4Out[6]:
5a 1
6b 2
7dtype: int64