Loading...
Rename Keys
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
A schema migration step renames certain columns in incoming record dicts. Return a new dict with the specified keys renamed according to the mapping; keys not present in the mapping pass through 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.