apply_mapping
Map column values using a dictionary to translate codes, merge categories, or create ordinal mappings. Unmapped values remain unchanged, with automatic type conversion.
Instructions
Map values in a column using a dictionary. Unmapped values stay as-is. Values are auto-converted to match the column's type. Map categorical values to new values. Useful for translating codes, merging similar categories, or creating ordinal mappings. Example: apply_mapping(column="FlownMonth", mapping={"SEPTEMBER":"9","OCTOBER":"10"})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| column | Yes | ||
| df_name | No | ||
| mapping | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |