danfo.OneHotEncoder
Encode categorical features as a one-hot numeric array.
class danfo.OneHotEncoder
danfo.js provides the OneHotEncoder class for encoding values in Series and Arrays to one-hot numeric arrays. This is mostly used as a preprocessing step before most machine learning tasks.
The API is similar to scikit-learn's OneHotEncoder, and provides a fit and transform method.
Examples
Convert Series to Dummy codes
Labels not found in the original data used for fitting are represented with 0s all through
See also LabelEncoder and danfo.getDummies
Last updated