Note

Pandas (41) 본문

Pandas

Pandas (41)

알 수 없는 사용자 2022. 9. 4. 16:13
728x90

How to count the number of missing values in each column?

# Input
df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/Cars93_miss.csv')

# Solution
n_missings_each_col = df.apply(lambda x: x.isnull().sum())
n_missings_each_col.argmax()

# output
'Luggage.room'

'Pandas' 카테고리의 다른 글

Pandas (43)  (0) 2022.09.07
Pandas (42)  (0) 2022.09.06
Pandas (40)  (0) 2022.09.03
Pandas (39)  (0) 2022.08.31
Pandas (38)  (0) 2022.08.30
Comments