Interpolate Missing Values

This transform fills missing values in the dataset using any of these methods such as linear, time, index and pad.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Interpolate Missing 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 this dataset from the drop-down list to fill the missing values. (Required: True, Multiple: False)

Output Dataset:

The file name with which the output dataset is created by filling the missing values. (Required: True, Multiple: False)

method:

Method used to interpolate the values. Possible methods:

  • linear - Ignores the index and linearly spaces the value.

  • time - Considers the datatime index to fill the missing values.

  • index - Uses the numerical values of the index.

  • Pad - Fills the missing values with the preceding values (forward fill).

(Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“CONSTANT”], Constant_options: [‘linear’,’time’,’index’,’pad’])

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

../../../_images/interpolate1.png

The output after running the Interpolate Missing Values transform on the dataset for linear method appears as below:

../../../_images/linear_interpolate_output.png

The output after running the Interpolate Missing Values transform on the dataset for pad method appears as below:

../../../_images/pad_interpolate_output.png

The output after running the Interpolate Missing Values transform on the dataset for index method appears as below:

../../../_images/index_interpolate_output.png

The output after running the Interpolate Missing Values transform on the dataset for time method appears as below:

../../../_images/index_interpolate_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 Interpolate Missing Values transform:

template=TemplateV2.get_template_by('Interpolate Missing Values')

recipe_Interpolate_Missing_Values= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Interpolate Missing Values')

transform=Transform()
transform.templateId = template.id
transform.name='Interpolate Missing Values'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_interpolated',
'value_1':"linear"}
recipe_Interpolate_Missing_Values.add_transform(transform)
recipe_Interpolate_Missing_Values.run()

Requirements

pandas