LearnPy Hub
← Exploratory Data Analysis (EDA) problems
Medium

Compare the Groups

For each department (alphabetical order) print its number of students, the mean score with 1 decimal and the highest score, as DEPT count mean max. Rows with a missing score don't count.

Input

A CSV table: a header line, then one line per row (an empty field means a missing value), then a line END.

Output

One line per department.

Sample 1

Input
dept,score
CSE,85
EEE,52
CSE,78
BBA,31
EEE,
BBA,61
CSE,91
END
Output
BBA 2 46.0 61
CSE 3 84.7 91
EEE 1 52.0 52

Sample 2

Input
dept,score
A,10
A,20
B,30
END
Output
A 2 15.0 20
B 1 30.0 30
solution.py
Output appears here
Hints
Compare the Groups · Python practice problem · LearnPy Hub