reviews.price.isnull()
pd.isnull(reviews.price)
>> True/False의 불리언 형식으로 빈칸인지 아닌지 알려줌
#이것 그대로 사용하긴 불편하고
#price가 null인 열만 따로 빼서 보기
reviews[reviews.price.isnull()]
#null의 개수 파악하기
reviews[reviews.price.isnull()].shape[0]
reviews.price.isnull().sum()
pd.isnull(reviews.price).sum()
참고
https://www.kaggle.com/code/residentmario/data-types-and-missing-values
Data Types and Missing Values
Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources
www.kaggle.com
'파이썬' 카테고리의 다른 글
[판다스] loc() 조건 설정해서 데이터 필터링 하기 (0) | 2024.01.30 |
---|---|
[판다스] dtype, dtypes, astype() (0) | 2024.01.30 |
[판다스] groupby 활용법 (0) | 2024.01.30 |
[판다스] map에서 lambda 쓰기, apply 쓰기 (0) | 2024.01.27 |
[판다스] df.idxmax(): 값이 가장 큰 행의 인덱스 반환 (0) | 2024.01.26 |