Loading...
The Column Transformer
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
Our data cleaning layer applies user-defined transformations to tabular data. Write a function called apply_transforms that takes a list of row dictionaries and a transforms dictionary mapping column names to functions. Apply each transform function to the corresponding column in every row. Return the modified rows. Columns not in transforms should be left unchanged.
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.