Skip to content

Commit 3475e7a

Browse files
committed
hand out day15 homework
1 parent 342ba8b commit 3475e7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

D15_groupy/homework.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
columns=['student_id','math_score','english_score','chinese_score','sex','class'])
88

99
# 找出全年級各科成績最高分與最低分?
10+
print( score_df.groupby(['class']).agg(['max','min']) )
1011

1112
# 找出數學班平均最高的班級?
12-
# 分析全校女生與男生國文平均差幾分?
13+
print( score_df.groupby(['class']).math_score.agg(['max']))
14+
15+
# 分析全校女生與男生國文平均差幾分?
16+
print( score_df.groupby(['sex']).chinese_score.agg(['mean']))

0 commit comments

Comments
 (0)