dataFrame.column.num — pow()
Description
The pow() method of the num object returns the values of the selected column raised to the specified power.
Signature
dataFrame.column(columnName).num.pow(exponent)Argument
columnName(string)- The name of the column containing the values to raise.
exponent(number)- The exponent to apply to each value.
Returns
mask( number[] )- An array containing the transformed values.
Example
// raise valuesfrom a column of the dataFrame to the power of 2
var mask = dataFrame.column('values').num.pow(2);
// add values to the dataFrame
dataFrame.column('newValues').set(mask);