Split dataset

This transform splits the dataset based on the given number of rows from the top.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Split dataset 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 split. (Required: True, Multiple: False)

Output Dataset:

The file name with which the split dataset is created. (Required: True, Multiple: False)

Spliting row:

The total number of rows up to which the dataset must be split. (Required: True, Multiple: False, Datatypes: [“INT”], Options: [“FIELDS”], Datasets: [“df”])

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

../../../_images/splitdata1.png

The output or result after adding the split data transform looks as below:

../../../_images/splitdata2.png

How to use it in Notebook

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

template=TemplateV2.get_template_by('Split dataset')

recipe_Split_dataset= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Split dataset')

transform=Transform()
transform.templateId = template.id
transform.name='Split dataset'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_splited',
'i':2}
recipe_Split_dataset.add_transform(transform)
recipe_Split_dataset.run()

Requirements

pandas