'finding percentage of total np.Nan values in the data frame using numpy or pandas

I want to find the percentage of missing values (np.nan) in python using NumPy and Pandas. I am using this code line:

print(df.isnull().sum().sum())

but it shows 0 as the result.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source