One Hot Encoder
One Hot encoder
tags: [“Data Preparation”]
Parameters
Input Dataset: Input Dataset (Required: True, Multiple: False)
Output Dataset: Dataset with OneHotEncoding (Required: True, Multiple: False)
Column: Column to OneHotEncoding (Required: True, Multiple: False, Options: [‘FIELDS’], Datasets: [‘df’])
The sample input for this transform looks as shown in the screenshot:

The output or result after adding the One Hot Encoder transform looks as below:

How to use it in Notebook
template=TemplateV2.get_template_by('One Hot Encoder')
recipe_One_Hot_Encoder= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='One Hot Encoder')
transform=Transform()
transform.templateId = template.id
transform.name='One Hot Encoder'
transform.variables = {
'input_dataset':'car',
'output_dataset':'ohe',
'col':"fueltype"}
recipe_One_Hot_Encoder.add_transform(transform)
recipe_One_Hot_Encoder.run()
Requirements
scikit-learn pandas