Flatten Dataset
This transform flattens the dataset that the data in all the columns become a single list and returns a single-column dataset.
tags: [“Data Preparation”]
Parameters
The table gives a brief description about each parameter in Filter Dataset equal 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 after flattening data in all the columns into a single list. (Required: True, Multiple: False)
Below is the screenshot with sample input data for this transform.
The output after running the Flatten dataset transform on the dataset appears as below:
How to use it in Notebook
template=TemplateV2.get_template_by('Flatten Dataset')
recipe_Flatten_Dataset= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Flatten Dataset')
transform=Transform()
transform.templateId = template.id
transform.name='Flatten Dataset'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_flatten'}
recipe_Flatten_Dataset.add_transform(transform)
recipe_Flatten_Dataset.run()
Requirements
pandas