dataFrame.column.fill — mean()
Description
The mean() method of the fill object fills missing values in the selected column with the arithmetic mean of the column.
Signature
dataFrame.column(columnName).fill.mean()Argument
columnName(string)- The name of the column to be fullfiled.
Returns
mask( number[] )- An array containing the fullfiled values.
Example
// fill missing value in the column 'revenue' with column mean
var mask = dataFrame.column('revenue').fill.mean();
// add values to the dataFrame
dataFrame.column('newValues').set(mask);