Generate NxN Random Int dataset

This generates an n-dimension random int dataset with with the desired random integer values.

tags: [“Data Preparation”]

Parameters

The table gives a brief description about each parameter in Generate NxN Random Int dataset transform.

Name:

By default, the transform name is populated. You can also add a custom name for the transform.

Output Dataset:

The file name with which the output dataset is created with desired random integer values for a specific dimension. (Required: True, Multiple: False)

value_1:

The number of rows to be created with random integer values. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [“CONSTANT”])

value_2:

The number of columns to be created with random integer values. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [“CONSTANT”])

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

../../../_images/generatenrandomint_input.png

The output after running the Generate NxN Random Int dataset transform on the dataset appears as below:

../../../_images/generaterandomintn_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 Generate NxN Random Int dataset transform:

template=TemplateV2.get_template_by('Generate NxN Random Int dataset')

recipe_Generate_NxN_Random_Int_dataset= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Generate NxN Random Int dataset')

transform=Transform()
transform.templateId = template.id
transform.name='Generate NxN Random Int dataset'
transform.variables = {
'output_dataset':'df_n',
'value_1':1,
'value_2':1}
recipe_Generate_NxN_Random_Int_dataset.add_transform(transform)
recipe_Generate_NxN_Random_Int_dataset.run()

Requirements

pandas numpy