dataFrame.column.num — toFloat()

Description

The toFloat() method of the num object returns the values of the selected column converted to floating-point numbers.

Signature

dataFrame.column(columnName).num.toFloat()
Scope
dataFrame
Family
num
Returns
array

Argument

columnName (string)
The name of the column containing the values to convert.

Returns

mask ( number[] )
An array containing the converted values.

Example

// convert values from a column of the dataFrame to floats
var mask = dataFrame.column('values').num.toFloat();

// add values to the dataFrame
dataFrame.column('newValues').set(mask);