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