dataFrame.column.fill — median()
Description
The median() method of the fill object fills missing values in the selected column with the median of the column.
Signature
dataFrame.column(columnName).fill.median()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 median
var mask = dataFrame.column('revenue').fill.median();
// add values to the dataFrame
dataFrame.column('newValues').set(mask);