Subtract Value Column

Subtract value column subtracts a specified value from each cell in a selected column of a Dataset

tags: [“Data Preparation”]

Parameters

Input Dataset: Input Dataset (Required: True, Multiple: False)

Output Dataset: Dataset with value subtracted to Column (Required: True, Multiple: False)

Value: Value to subtract (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [‘CONSTANT’])

Column: Column to subtract (Required: True, Multiple: True, Options: [‘FIELDS’], Datasets: [‘df’])

The sample input for this transform looks as shown in the screenshot:

../../../_images/svc1.png

The output or result after adding the Subtract Value Column transform looks as below:

../../../_images/svc2.png

How to use it in Notebook

template=TemplateV2.get_template_by('Subtract Value Column')

recipe_Subtract_Value_Column= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Subtract Value Column')

transform=Transform()
transform.templateId = template.id
transform.name='Subtract Value Column'
transform.variables = {
'input_dataset':'only_numeric',
'output_dataset':'subvc',
'value':1,
'col':"Age"}
recipe_Subtract_Value_Column.add_transform(transform)
recipe_Subtract_Value_Column.run()

Requirements

pandas