dataFrame.column.stat — percent()
Description
The percent() method of the stat object returns the values of the selected column converted to percentages using min-max normalization.
Signature
dataFrame.column(columnName).stat.percent()Argument
columnName(string)- The name of the column from which to get the percentage values.
Returns
mask(array)- An array containing the percentage values.
Example
// get the percent values of a column of the dataFrame
var mask = dataFrame.column('revenue').stat.percent();
// add the percent values to the dataFrame
dataFrame.column('percValues').set(mask);