강의

멘토링

커뮤니티

Inflearn Community Q&A

hhyaluu4789's profile image
hhyaluu4789

asked

Getting started with data analysis with Kaggle surveys

[4/13] 🌏 Where does Kaggler live and what does he do?! - Reducing repetitive tasks with functions (1)

order

Written on

·

266

1

def show_countplot_by_qno(qno, fsize(10,6), order = None): if not order: order = answer[qno].valu_counts().index plt.figure(figsize=fsize sns.countplot(data=answer, y=qno, oreder = order ).set_title(question[qno]) show_countplot_by_qno('Q5')
 
저기 order에서 인덱스값을 정렬하기만 하면 그래프가 자동으로 인덱스값을 따라가는건가요?
pandasseabornkaggle

Answer 1

0

todaycode님의 프로필 이미지
todaycode
Instructor

안녕하세요.

정렬하고자 하는 인덱스 순서대로 지정하면 지정한 순서대로 그려집니다.

hhyaluu4789's profile image
hhyaluu4789

asked

Ask a question