분석시각화 대회 코드 공유 게시물은
내용 확인 후
좋아요(투표) 가능합니다.
온라인 교육 제공 안내
안녕하세요, 데이터·AI를 활용한 물가 예측 경진대회 : 농산물 가격을 중심으로 참가자 여러분.
데이콘입니다.
본 대회 참가자분들께 보다 나은 경험과 대회 참여를 위해 데이스쿨에서 온라인 콘텐츠를 제공합니다.
해당 콘텐츠의 경우, 대회가 종료되는 2024년 11월 14일(목) 까지 해당 콘텐츠를 통해 학습하실 수 있습니다.
감사합니다.
스테이지 2의 스텝 15에서 통과가 되지 않는데 답을 알 수 있을까요?
import seaborn as sns
# 주(week)와 월(month) 정보를 새로운 컬럼에 저장
train_prep['Week'] = train_prep['date'].dt.isocalendar().week.astype(np.int32)
train_prep['Month'] = train_prep['date'].dt.month
item_selected = '배추'
# 주와 월별 Box Plot 그리기
fig, axes = plt.subplots(2, 1, figsize=(12, 8))
plt.suptitle('Box Plot by Week and Month', fontsize=16)
# 주별 Box Plot
sns.boxplot(x='Week', y=f'{item_selected}_가격(원/kg)', data=train_prep, ax=axes[0])
axes[0].set_title('Box Plot by Week', fontsize=14)
axes[0].set_xlabel('week', fontsize=12)
axes[0].set_ylabel(f'{item_selected} 가격(원/kg)', fontsize=12)
# 월별 Box Plot
sns.boxplot(x='Month', y=f'{item_selected}_가격(원/kg)', data=train_prep, ax=axes[1])
axes[1].set_title('Box Plot by Month', fontsize=14)
axes[1].set_xlabel('month', fontsize=12)
axes[1].set_ylabel(f'{item_selected} 가격(원/kg)', fontsize=12)
plt.tight_layout()
plt.show()
CodingDochi 님 안녕하세요.
관련 사항 데이콘에 가입하신 메일로 보내드렸으니 확인 부탁드립니다.
감사합니다.
데이콘(주) | 대표 김국진 | 699-81-01021
통신판매업 신고번호: 제 2021-서울영등포-1704호
직업정보제공사업 신고번호: J1204020250004
서울특별시 영등포구 은행로 3 익스콘벤처타워 901호
이메일 dacon@dacon.io |
전화번호: 070-4102-0545
Copyright ⓒ DACON Inc. All rights reserved
좋은 자료 감사합니다. 도움 많이 되고있어요