자주 쓰는 데이터 분석 코드
nan,null(결측값) 체크하기
Aiden_
2021. 9. 25. 23:30
# nan(null) 값 있는 행만 가져오기
df[df['actors'].isnull()]
# nan(null) 값 없는 행만 가져오기
df[~df['actors'].isnull()]
# 데이터가 nan(null)값인지 체크
1. np.isnan()
import np
np.isnan(thing)
2. is None
데이터 is None