HF RL Explorer

Task: Create Dummy Variables with Predefined Categories

Task: Create Dummy Variables with Predefined Categories: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that converts a categorical column in a DataFrame into dummy variables, ensuring that all predefined categories are represented as columns — even if some categories are not…

The task

Write a Python script that converts a categorical column in a DataFrame into dummy variables, ensuring that **all predefined categories** are represented as columns — even if some categories are not present in the input data. Missing categories should result in columns filled with zeros.

Part of PrimeIntellect/Terminal-Lego-15k.