Add Prefix

This transform allows you to add prefix to all the column names in a dataset.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Add Prefix transform.

Descriptions

Field name

Field description

Name

By default, the transform name is populated. You can also add a custom name for the transform.

Input Dataset

The name of the dataset which you have uploaded. (Required: True, Multiple: False)

Output Dataset

The file name with which the output dataset is created. (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“CONSTANT”])

value_1

The text you want to add as a prefix to all column names. (Required: True, Multiple: False)

Sample input for Add Prefix transform:

../../../_images/addprefixnew.png

The output or result after adding and running the prefix transform looks as below:

../../../_images/resultaddprefix.png

Using prefix on the Notebook

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

template=TemplateV2.get_template_by('Add Prefix')

recipe_Add_Prefix= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Add Prefix')

transform=Transform()
transform.templateId = template.id
transform.name='Add Prefix'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_prefixed',
'value_1':"A"}
recipe_Add_Prefix.add_transform(transform)
recipe_Add_Prefix.run()

Requirements

pandas