일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- scikit-learn
- 결측값
- opencv
- k-최근접 이웃 분류
- computer vision
- Deep learning
- NAN
- sklearn
- 데이터프레임
- dataframe
- NULL
- 알파브렌딩
- KNeighborsClassifier
- index
- 판다스
- 지도학습
- ML
- Python
- 이미지프로세싱
- 결측치
- 이미지처리
- 파이썬
- 비트와이즈
- dropna
- mask detection
- pandas
- 사이킷런
- Supervised learning
- tfidfvectorizer
- 머신러닝
- Today
- Total
목록NAN (2)
Sun.El Data Analysis

데이터 프레임 내에서 결측값을 확인하고 처리하기 1. 데이터 확인하기[IN]import pandas as pdimport seaborn as snsimport numpy as npdf = sns.load_dataset('planets')df.head(10) [OUT]method number orbital_period mass distance year0 Radial Velocity 1 269.300 7.10 77.40 20061 Radial Velocity 1 874.774 2.21 56.95 20082 Radial Velocity 1 763.000 2.60 19.84 20113 Radial Velocity 1 326.030 19.40 110.62 20074 Radial Velocity 1 516.220 ..

1. 결측치/비결측치 행 True, False 확인 : isnull, notnull df.isnull() df.isna() df.notnull() 2. 결측치 관련 행/열 정보 확인 : isnull, notnull #칼럼 내 NaN이 하나라도 있으면 True, 없으면 False df.isnull().any(axis=0) df.isna().any(axis=0) #칼럼 내 모두 NaN이면 True, 아니면 False df.isnull().all(axis=0) df.isna().all(axis=0) #칼럼 내 NaN이 하나도 없으면 True, 하나라도 있으면 False df.notnull().all(axis=0) #로우 내 NaN이 하나라도 있으면 True, 없으면 False df.isnull().any(ax..