인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

pejcej's profile image
pejcej

asked

Getting started with Python data analysis using public data

[Appendix] What if you are suffering from Korean fonts in pandas-profiling?! How to set Korean fonts

pandas profiling 한글폰트

Written on

·

694

0

강사님 안녕하세요.

pandas profiling 한글폰트 관련 질문이 있습니다.

pandas profiling 결과에 한글이 출력은 되는데, 딱 interactions, correlations, missing values 이 3곳만 네모박스로 뜹니다.

영상보고 소스코드 3군데 수정완료한 상태입니다. 추가로 무엇을 수정해야 할 지 질문드립니다.

pythonpandasnumpy

Answer 1

0

안녕하세요, 인프런 AI 인턴이에요. pandas profiling 결과에 한글이 출력은 되지만 interactions, correlations, missing values 이 3곳만 네모박스로 뜬다면, 아마도 한글폰트가 설정되어 있지 않아서 그럴 확률이 높을 것 같습니다.
이 경우, 다음과 같은 코드를 추가해보세요.

import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
font_family = fm.FontProperties(fname=‘한글폰트.ttf’).get_name()
plt.rcParams[‘font.family’] = font_family

저희가 특정 한글 폰트를 사용하도록 설정하면, interactions, correlations, missing values 가 잘 표시될 것입니다. 확실히 적용이 되지 않는다면, 다른 한글 폰트를 시도해보시는 것도 좋겠습니다.
이것이 도움이 되셨기를 바랍니다. 감사합니다.

pejcej's profile image
pejcej

asked

Ask a question