dataFrame.column.num — round()
Description
The round() method of the num object returns the values of the selected column rounded to the specified number of decimal places.
Signature
dataFrame.column(columnName).num.round(decimals)Argument
columnName(string)- The name of the column containing the values to round.
decimals(number)- The number of decimal places to keep.
Returns
mask( number[] )- An array containing the rounded values.
Example
// round values from a column of the dataFrame
var mask = dataFrame.column('values').num.round(2);
// add values to the dataFrame
dataFrame.column('newValues').set(mask);