dataFrame.rows — chunks()
Description
The chunks() method of the rows object returns an array assigning each row to a chunk of the specified size.
Signature
dataFrame.rows.chunks(size)Argument
size(number)- The maximum number of rows per chunk.
Returns
mask( number[] )- An array containing the chunk index assigned to each row.
Example
// get the chunks for a given dataFrame
var mask = df.rows.chunks(10);
// set a new column with the chunks indexes
dataFrame.column('chunk').set(mask);