Pivot dataset
Creates a spreadsheet-style pivot table as a dataset
tags: [“Data Preparation”]
Parameters
Input Dataset: dataset to be pivoted (Required: True, Multiple: False)
Output Dataset: Pivoted dataset (Required: True, Multiple: False)
Column used for values: Values for the pivoted dataset (Required: True, Multiple: True, Datatypes: [“STRING”], Options: [‘FIELDS’], Datasets: [‘df’])
Column used for indices: Indices for the pivoted dataset (Required: True, Multiple: True, Datatypes: [“STRING”], Options: [‘FIELDS’], Datasets: [‘df’])
New dataset Column: Column values for the pivoted dataset (Required: True, Multiple: True, Datatypes: [“STRING”], Options: [‘FIELDS’], Datasets: [‘df’])
How to use it in Notebook
template=TemplateV2.get_template_by('Pivot dataset')
recipe_Pivot_dataset= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Pivot dataset')
transform=Transform()
transform.templateId = template.id
transform.name='Pivot dataset'
transform.variables = {
'input_dataset':'car',
'output_dataset':'car_pivoted',
'A':"wheelbase",
'B':"car_ID",
'C':"aspiration"}
recipe_Pivot_dataset.add_transform(transform)
recipe_Pivot_dataset.run()
How to use it in RC UI
Requirements
pandas numpy