rand function in the Factory
The rand function returns a random column with the specified number of elements. If the number of elements is specified, a random column is created with n (n=number of rows) elements.
Parameters Parameter Description n The number of rows to fill with random values. Its default value corresponds to the number of rows of the dataset. seed A base value, used to generate random values. It makes the random generation deterministic. Example The following example uses the Bike Sales dataset. This example isn’t based on a real scenario, it only explains how to use the function. Description Screenshot In this example, we want to add a new column and to fill only 10 rows of it, with 5 as the base value. Add a new column, then type the following formula: rand(n,seed)
rand(10,5)