dataFrame.column.num — roundMultiple()
Description
The roundMultiple() method of the num object returns the values of the selected column rounded to the nearest multiple of the specified value.
Signature
dataFrame.column(columnName).num.roundMultiple(decimals)Argument
columnName(string)- The name of the column containing the values to round.
multiple(number)- The multiple to which values should be rounded.
Returns
mask( number[] )- An array containing the rounded values.
Example
// round values from a column of the dataFrame to the nearest multiple
var mask = dataFrame.column('values').num.roundMultiple(10);
// add values to the dataFrame
dataFrame.column('newValues').set(mask);