1. null or NaN or missing data check
df.isnull().sum()
2. drop data based on X-axis
df.dropna(axis=0)
3. drop data in terms of Y-axis
df.dropna(axis=1)
4. drop data included all NaN in Columns
df.dropna(how='all')
5. drop rows that have fewer than 4 values
df.dropna(thresh=4)
6. drop data in specific columns
df.dropna(subset=['C'])
'데이터분석 > pandas' 카테고리의 다른 글
| encoding for class labels (0) | 2023.07.03 |
|---|---|
| imputing missing values in pandas (0) | 2023.07.03 |
| data cleaning (0) | 2019.11.06 |
| nump 사용 (0) | 2019.10.31 |
| data crawling (0) | 2019.10.28 |