강의

멘토링

커뮤니티

Inflearn Community Q&A

sogangreleaseinf5755's profile image
sogangreleaseinf5755

asked

[Renewed] Python Machine Learning Bootcamp for Beginners (Easy! Learn by Solving Real Kaggle Problems) [Data Analysis/Science Part2]

EDA Starting with the Titanic Problem: Categorical Data Analysis Pattern 1 (Updated)

3강 강의 자료 코드 관련 질문입니다

Written on

·

329

1

- 섹션 3 타이타닉 문제로 시작하는 EDA: 범주형 데이터 분석 패턴1 11분 13초에 나오는 코드를 수정하지 않고 실행하였는데 ValueError: could not convert string to float: 'Braund, Mr. Owen Harris'가 떴습니다. 해결 방법을 알 수 있을까요

python머신러닝pandaskaggle

Answer 1

1

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요. 답변 도우미입니다.

우선 불편을 드려 죄송합니다. 최신 pandas 버전에서는 doc.corr() 이 자동으로 문자컬럼을 제외하고, 계산해주지 않고, 에러를 내는 이슈가 발견되었습니다. 이에 다음과 같이 해당 자료를 새로 업데이트하였습니다. 새로 자료를 다운받으시면 도움이 되실 것 같습니다.

감사합니다.

# 2024.03.25: 최신 pandas 버전에서는 doc.corr() 이 자동으로 문자컬럼을 제외하고, 계산해주지 않고, 에러를 냄

# 2024.03.25: 다음과 같이 numeric_only=True 옵션을 기재해줘야 함

# train.corr().iplot(kind='heatmap', colorscale='Blues')

train.corr(numeric_only=True).iplot(kind='heatmap', colorscale='Blues')

 

sogangreleaseinf5755's profile image
sogangreleaseinf5755

asked

Ask a question