Take Value

This transform returns the elements in the dataset for the passed positional indices along an axis.

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. (Required: True, Multiple: False)

Output Dataset:

The file name with which the output is created. This contains the values of all columns for the passed indices. (Required: True, Multiple: False)

indices:

An array of ints indicating which index positions to consider. Example: [1, 9] (Required: True, Multiple: True, Datatypes: [“STRING”], Options: [“CONSTANT”])

axis:

The axis on which to select elements. 0 means only rows are selected, 1 means the columns are selected. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [“CONSTANT”], Constant_options: [0,1])

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

../../../_images/takevalue_input.png

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

../../../_images/takevalue_output.png

How to use it in Notebook

The following is the code snippet you must use in the Jupyter Notebook editor to run the Take Value transform:

template=TemplateV2.get_template_by('Take Value')

recipe_Take_Value= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Take Value')

transform=Transform()
transform.templateId = template.id
transform.name='Take Value'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_taken',
'value_1':"[1]",
'value_2':0}
recipe_Take_Value.add_transform(transform)
recipe_Take_Value.run()

Requirements

pandas