Encode Values
Last updated
Was this helpful?
Last updated
Was this helpful?
Encodes values in a column through a variety of methods:
Label Encoding: Encode target labels with value between 0 and n_classes-1. See scikit-learn's for full documentation.
Target Encoding: Encode a categorical column with the average value of a target column for the corresponding value of the categorical column. See scikit-learn's for full documentation.
One Hot Encoding: Encode a categorical column as a 0 or 1 for each possible category, each of which will be it's own row.
method
string
Encoding method which will be used ('label', 'target', or 'oh')
column
column
Column name to label encode
target
column
Required if method = 'target'. Numeric target column to use to create averages
True