<aside> 👉 제출 안내
</aside>
https://notion-widget-kit.vercel.app/timer?목표일=20250121&목표시간=1630&글꼴번호=2&크기=20&굵기=3&머리말=✅제출까지&꼬리말=남음🔥&외부간격=20&내부간격=10&배경색=White&글자색=Black
<aside> ✅
선행 커맨드
import seaborn as sns
import pandas as pd
</aside>
<aside> ◾
cut
: Fair
= 1, Good
= 2, Very Good
= 3, Premium
= 4, Ideal
= 5로 인코딩하세요.color
: E
, I
, J
, H
, F
, G
, D
를 각각 1부터 7로 인코딩하세요.clarity
:
SI2
와 SI1
→ 1
(S 그룹),VS1
와 VS2
→ 2
(VS 그룹),VVS2
와 VVS1
→ 3
(VVS 그룹),I1
과 IF
→ 4
(I 그룹).diamonds = sns.load_dataset("diamonds")
# Categorical -> String 변환
diamonds["cut"] = diamonds["cut"].astype(str)
diamonds["color"] = diamonds["color"].astype(str)
diamonds["clarity"] = diamonds["clarity"].astype(str)
"""
코드 입력
"""
# 결과 출력
print(diamonds.shape)
print(diamonds.head())
'''
(53920, 11)
carat cut color clarity depth table price x y z volume
0 0.23 5 1 1 61.5 55.0 326 3.95 3.98 2.43 38.202030
1 0.21 4 1 1 59.8 61.0 326 3.89 3.84 2.31 34.505856
2 0.23 2 1 2 56.9 65.0 327 4.05 4.07 2.31 38.076885
3 0.29 4 2 2 62.4 58.0 334 4.20 4.23 2.63 46.724580
4 0.31 2 3 1 63.3 58.0 335 4.34 4.35 2.75 51.917250
'''
</aside>
<aside> ◾
def add_student(grades, name, score):
"""
코드 작성
"""
def calculate_average(grades):
"""
코드 작성
"""
def find_top_student(grades):
"""
코드 작성
"""
# Example usage
grades = {}
add_student(grades, "Alice", 85)
add_student(grades, "Bob", 92)
add_student(grades, "Charlie", 78)
print(f"Average score: {calculate_average(grades):.2f}")
top_student, top_score = find_top_student(grades)
print(f"Top student: {top_student} with score {top_score}")
출력 결과
"""
Added Alice with score 85.
Added Bob with score 92.
Added Charlie with score 78.
Average score: 85.00
Top student: Bob with score 92
"""
</aside>
<aside> 👉 제출
</aside>
https://notion-widget-kit.vercel.app/timer?목표일=20250121&목표시간=1630&글꼴번호=2&크기=20&굵기=3&머리말=✅제출까지&꼬리말=남음🔥&외부간격=20&내부간격=10&배경색=White&글자색=Black
Copyright ⓒ 2025 TeamSparta All rights reserved.