<aside> 👉 제출 안내
</aside>
https://notion-widget-kit.vercel.app/timer?목표일=20250115&목표시간=1630&글꼴번호=2&크기=20&굵기=3&머리말=✅제출까지&꼬리말=남음🔥&외부간격=20&내부간격=10&배경색=White&글자색=Black
<aside> ✅
선행 커맨드
import seaborn as sns
import pandas as pd
</aside>
<aside> ◾
데이터 변형 - Iris 데이터셋을 활용하여 다음을 수행하세요:
조건
: concat을 사용할 때, ignore_index=True 옵션을 추가하여 인덱스를 재설정하세요.# Iris 데이터셋 로드
iris = sns.load_dataset("iris")
"""
코드 입력
"""
# 최종 데이터프레임 출력
print(concat_df.iloc[50])
print(concat_df.iloc[120])
'''
sepal_length 7.2
sepal_width 3.0
petal_length 5.8
petal_width 1.6
species virginica
category above_average
Name: 50, dtype: object
sepal_length 5.5
sepal_width 2.3
petal_length 4.0
petal_width 1.3
species versicolor
category below_average
Name: 120, dtype: object
'''
</aside>
<aside> ◾
Iris 데이터셋과 새로운 데이터프레임을 활용하여 다음을 수행하세요:
힌트
# Iris 데이터셋 로드
iris = sns.load_dataset("iris")
"""
코드 입력
"""
# 결과 출력
print(merged_df.iloc[10])
print(merged_df.iloc[50])
print(merged_df.iloc[120])
'''
sepal_length 5.4
sepal_width 3.7
petal_length 1.5
petal_width 0.2
species setosa
avg_petal_length 1.462
avg_petal_width 0.246
Name: 10, dtype: object
sepal_length 7.0
sepal_width 3.2
petal_length 4.7
petal_width 1.4
species versicolor
avg_petal_length 4.26
avg_petal_width 1.326
Name: 50, dtype: object
sepal_length 6.9
sepal_width 3.2
petal_length 5.7
petal_width 2.3
species virginica
avg_petal_length 5.552
avg_petal_width 2.026
Name: 120, dtype: object
'''
</aside>
<aside> ◾
데이터 집계 - Tips 데이터셋을 활용하여 다음을 수행하세요:
힌트
: groupby()와 pivot_table()을 활용하세요.
# Tips 데이터셋 로드
tips = sns.load_dataset("tips")
"""
코드 작성
"""
print(pivot_table)
'''
tip total_bill
time Lunch Dinner Lunch Dinner
day
Thur 2.767705 3.000000 1077.55 18.78
Fri 2.382857 2.940000 89.92 235.96
Sat NaN 2.993103 0.00 1778.40
Sun NaN 3.255132 0.00 1627.16
'''
</aside>
<aside> 👉 제출
</aside>
https://notion-widget-kit.vercel.app/timer?목표일=20250115&목표시간=1630&글꼴번호=2&크기=20&굵기=3&머리말=✅제출까지&꼬리말=남음🔥&외부간격=20&내부간격=10&배경색=White&글자색=Black