Loading...
Group Average
A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- hard
Problem
A rollup step averages metric values grouped by a category key. The input is a list of [key, value] pairs. Return a dict mapping each key to the average of its associated values.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.