Multiply Column
This transforms multiplies a column by a specific Value.
tags: [“Data Preparation”]
Parameters
The table gives a brief description about each parameter in Multiply Column transform.
- Name:
By default, the transform name is populated. You can also add a custom name for the transform.
- Input Dataset:
The file name of the input dataset. You can select the dataset that was uploaded from the drop-down list.(Required: True, Multiple: False)
- Output Dataset:
The file name with which the output dataset is created. This contains the dataset with multiplied Column. (Required: True, Multiple: False)
- Value:
The value with which the column must be multiplied. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [‘CONSTANT’])
- Column:
The name of the column to be multiplied. (Required: True, Multiple: True, Options: [‘FIELDS’], Datasets: [‘df’])
The sample input for this transform looks as shown in the screenshot.
The output after running the Multiply Column transform on the dataset appears as below:
How to use it in Notebook
template=TemplateV2.get_template_by('Multiply Column')
recipe_Multiply_Column= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Multiply Column')
transform=Transform()
transform.templateId = template.id
transform.name='Multiply Column'
transform.variables = {
'input_dataset':'only_numeric',
'output_dataset':'multvc',
'value':1,
'col':"Age"}
recipe_Multiply_Column.add_transform(transform)
recipe_Multiply_Column.run()
Requirements
pandas