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