판다스 데이터 정제하기

1. 결손값 확인하기

# isna()

df.isna().head(10)

df.isna().sum()
-----------------------------------------------
Unnamed: 0           0
ID                   0
Name                 0
Age                  0
Photo                0
                  ... 
GKHandling          48
GKKicking           48
GKPositioning       48
GKReflexes          48
Release Clause    1564
Length: 89, dtype: int64

2. 결손값 채워넣기

# fillna()

df['GKHandling'] = df['GKHandling'].fillna(df['GKHandling'].mean())

Tags:

Categories:

Updated: