dataFrame.rows — sample()

Description

The sample() method of the rows object keeps a random sample of rows based on the specified proportion.

Signature

dataFrame.rows.sample(proportion)
Scope
dataFrame
Family
rows
Returns
mutates

Argument

proportion (number)
A value between 0 and 1 representing the proportion of rows to keep. (Default: 0.1)

Example

// adjust the data rows of a dataFrame to a sample of 10%
dataFrame.rows.sample(0.1);