Python zlicz wartości zerowe w DataFrame
# Count total missing values in a dataframe
df.isnull().sum().sum()
# Gives a integer value
Pinky Pink
# Count total missing values in a dataframe
df.isnull().sum().sum()
# Gives a integer value
import pandas as pd
df = pd.DataFrame({'a':[1,2,np.nan], 'b':[np.nan,1,np.nan],'c':[np.nan,2,np.nan], 'd':[np.nan,np.nan,np.nan]})
print(pd.isnull(df).sum())