LearnPy Hub
← Matplotlib Charts problems
Hard

Plot From pandas

Read lines region amount until END. Group by region (alphabetical), sum, and draw a bar chart with Series.plot(kind='bar'). Print the bar heights as ints and the x tick labels.

Input

Lines, then END.

Output

Two lines.

Sample 1

Input
Dhaka 500
Sylhet 300
Dhaka 700
END
Output
[1200, 300]
Dhaka Sylhet

Sample 2

Input
A 1
END
Output
[1]
A
solution.py
Output appears here
Plot From pandas · Python practice problem · LearnPy Hub