OneHotEncoder

Compatibility: categorical data

The OneHotEncoder transforms data that represents unordered, categorical values into multiple columns -- one for each category. These new columns have 0 and 1 values. A 1 indicates the correct, original category.

In this example, VISA is encoded in the credit_card.value0 column, AMEX is encoded in the credit_card.value1 column, etc.
from rdt.transformers.categorical import OneHotEncoder
ohe = OneHotEncoder()

Parameters

No parameters are available for this transformer.

FAQs

What happens to missing values?

This transformer treats missing values as if they are a new category of data.

Last updated