Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
bool 결측치 처리 본문
df['bool_col'] = df['bool_col'].astype(str).str.lower().eq('true')
df['bool_col'] = df['bool_col'].fillna(False).astype(str).str.lower().eq('true')
df['bool_col'] = df['bool_col'].map(lambda x: x is True)
'랭귀지 > pandas' 카테고리의 다른 글
assign (0) | 2025.01.09 |
---|---|
pandas 빈값이 아닌면 a컬럼을 _기준으로 split 하고 첫번째값 사용 (0) | 2025.01.03 |
df 에a,b,c 컬럼이 있고 df2에도 a,b,c 컬럼이 있다면 df 에는없지만 df2애는있는 a,b,c 구하기 (0) | 2025.01.03 |
pandas에서 데이타프레임의 타입이 틀린 항목찿기 (0) | 2024.12.23 |
CASE WHEN 과 np.where 비교 (1) | 2024.12.20 |
Comments