“Python zlicz wartości zerowe w DataFrame” Kod odpowiedzi

Python zlicz wartości zerowe w DataFrame

# Count total missing values in a dataframe

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

# Gives a integer value
Pinky Pink

Policz nan pandy

#Python, pandas
#Count missing values for each column of the dataframe df

df.isnull().sum()
Ahh the negotiatior

DF liczba brakujących wartości

In [5]: df = pd.DataFrame({'a':[1,2,np.nan], 'b':[np.nan,1,np.nan]})

In [6]: df.isna().sum()
Out[6]:
a    1
b    2
dtype: int64
Gifted Gecko

Odpowiedzi podobne do “Python zlicz wartości zerowe w DataFrame”

Pytania podobne do “Python zlicz wartości zerowe w DataFrame”

Więcej pokrewnych odpowiedzi na “Python zlicz wartości zerowe w DataFrame” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu