Loading...
The Column Shuffle
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- staff
Problem
The ML feature store requires one row per entity with amounts in separate columns. Given records with an ID and variable-length amounts, reshape each group so amounts become amount_1, amount_2, amount_3 in a single dictionary per ID.
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.