Square Column
This transform gives the square of every element in a specific column of a dataset.
tags: [“Data Preparation”]
Parameters
The table gives a brief description about each parameter in Square Root 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 to perform square operation on every element in a specific column. (Required: True, Multiple: False)
- Output Dataset:
The file name with which the output is created. This contains the square of values of a particular column. (Required: True, Multiple: False)
- Column:
The column on which the square operation must be performed. (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“FIELDS”], Datasets: [“df”])
The sample input for this transform looks as shown in the screenshot:
The output or result after adding the square transform looks as below:
How to use it in Notebook
The following is the code snippet you must use in the Jupyter Notebook editor to run the Square Column transform:
template=TemplateV2.get_template_by('Square Column')
recipe_Square_Column= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Square Column')
transform=Transform()
transform.templateId = template.id
transform.name='Square Column'
transform.variables = {
'input_dataset':'only_numeric',
'output_dataset':'scds',
'col':"Age"}
recipe_Square_Column.add_transform(transform)
recipe_Square_Column.run()
Requirements
pandas