label_encode
Transform ordinal categorical columns into integer labels (0,1,2,...) for machine learning pipelines. Designed for natural order data like low/medium/high.
Instructions
Label-encode categorical columns: map each unique value to an integer (0, 1, 2, ...). Use ONLY for ordinal data with natural order (e.g., low/medium/high, small/large). For nominal categories without order, use one_hot_encode or target_encode. Example: label_encode(columns=["City","Category"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | ||
| df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |