Replace Infinite Values

This transform will replace the infinite values (inf) with the given value in a dataset.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Replace Infinite Values 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 replace the infinite values with the provided value. (Required: True, Multiple: False)

Output Dataset:

The file name with which the output dataset is created. The output dataset has infinite values replaced with the new value provided. (Required: True, Multiple: False)

value_1:

The value with which the infinite value (inf) in the input dataset is replaced. (Required: True, Multiple: False, Datatypes: [‘ANY’], Options: [“CONSTANT”])

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

../../../_images/replaceinfinitevalue_input.png

The output after running the Replace Infinite Values transform on the dataset appears as below:

../../../_images/replaceinfinitevalue_output.png

How to use it in Notebook

template=TemplateV2.get_template_by('Replace Infinite Values')

recipe_Replace_Infinite_Values= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Replace Infinite Values')

transform=Transform()
transform.templateId = template.id
transform.name='Replace Infinite Values'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_inf_replaced',
'value_1':1}
recipe_Replace_Infinite_Values.add_transform(transform)
recipe_Replace_Infinite_Values.run()

Requirements

pandas numpy