dataset Head

This transform returns a specified number of rows from the top, in a dataset.

tags: [“EDA”]

Parameters

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

Output Dataset:

The file name with which the output dataset is created. This file has the specified number of rows from the top. (Required: True, Multiple: False)

n:

The number of rows to be returned. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [“CONSTANT”])

The sample input for this transform looks as below:

../../../_images/dataset_head_input.png

The output after running the dataset head transform on the dataset appears as below:

../../../_images/datasethead_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 dataset Head transform:

template=TemplateV2.get_template_by('dataset Head')

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

transform=Transform()
transform.templateId = template.id
transform.name='dataset Head'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_head',
'value_1':1}
recipe_dataset_Head.add_transform(transform)
recipe_dataset_Head.run()

Requirements

pandas