
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
아래와 같이 입력하고 실행하면
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.rc('font', family='NanumBarunGothic') #한글 깨짐 방지 글꼴 설정
sparta_data = pd.read_table('/content/user_registered_class.csv',sep=',')
sum_of_students_by_class = sparta_data[sparta_data==1].count()
sum_of_students_by_class
#테이블.drop("삭제할 행/열")을 통해 데이터를 삭제 할수 있습니다.
sum_of_students_by_class = sum_of_students_by_class.drop('user_id')
sum_of_students_by_class
#그래프 사이즈 설정
plt.figure(figsize=(10,5))
#그래프 x, y축 설정
plt.bar(sum_of_students_by_class.index, sum_of_students_by_class.values)
#그래프 타이틀
plt.title('게임 종합반 신청한 학생 수강이력')
#x축 레이블
plt.xlabel('강의')
#y축 레이블
plt.ylabel('수강생(명)')
#그래프 보여주기
plt.show()
작성한 코드 및 에러 메세지
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 49688 (\N{HANGUL SYLLABLE SU}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 44053 (\N{HANGUL SYLLABLE GANG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 49373 (\N{HANGUL SYLLABLE SAENG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 47749 (\N{HANGUL SYLLABLE MYEONG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 44172 (\N{HANGUL SYLLABLE GE}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 51076 (\N{HANGUL SYLLABLE IM}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 51333 (\N{HANGUL SYLLABLE JONG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 54633 (\N{HANGUL SYLLABLE HAB}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 48152 (\N{HANGUL SYLLABLE BAN}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 49888 (\N{HANGUL SYLLABLE SIN}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 52397 (\N{HANGUL SYLLABLE CEONG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 54620 (\N{HANGUL SYLLABLE HAN}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 54617 (\N{HANGUL SYLLABLE HAG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 51060 (\N{HANGUL SYLLABLE I}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 47141 (\N{HANGUL SYLLABLE RYEOG}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.
/usr/local/lib/python3.10/dist-packages/IPython/core/pylabtools.py:151: UserWarning: Glyph 51032 (\N{HANGUL SYLLABLE YI}) missing from current font.
fig.canvas.print_figure(bytes_io, **kw)
WARNING:matplotlib.font_manager:findfont: Font family 'NanumBarunGothic' not found.오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
