Filter Example Range

This function allows you to select the range of row indices and get the values for the selected range.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Filter Example Range 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 from which the selected range of row indices should be obtained. (Required: True, Multiple: False)

Output Dataset:

The file name of the output dataset. This file contains the values for the selected range of row indices. (Required: True, Multiple: False)

First example:

The start range of the row index from which the values to be filtered. (Required: True, Multiple: False, Datatypes: [‘LONG’], Options: [‘FIELDS’], Datasets: [‘df’])

Last example:

The end value of the row index up to which the values to be filtered. (Required: True, Multiple: False, Datatypes: [‘LONG’], Options: [‘FIELDS’], Datasets: [‘df’])

Below is the screenshot with sample input data for this transform

../../../_images/filterexmran_input.png

The output after running the Filter Example Range transform on the dataset appears as below:

../../../_images/filterexmran_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 Filter Example Range transform:

template=TemplateV2.get_template_by('Filter Example Range')

recipe_Filter_Example_Range= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Filter Example Range')

transform=Transform()
transform.templateId = template.id
transform.name='Filter Example Range'
transform.variables = {
'input_dataset':'car',
'output_dataset':'filtred_er_car',
'i':2,
'j':5}
recipe_Filter_Example_Range.add_transform(transform)
recipe_Filter_Example_Range.run()

Requirements

pandas