dataFrame.column.fill — forward()

Description

The forward() method of the fill object fills missing values in the selected column using the previous non-empty value.

Signature

dataFrame.column(columnName).fill.forward()
Scope
column
Family
fill
Returns
mask

Argument

columnName (string)
The name of the column to be fullfiled.

Returns

mask ( number[] )
An array containing the fullfiled values.

Example

// fill missing value forward in the column 'revenue'
var mask = dataFrame.column('revenue').fill.forward();

// add values to the dataFrame
dataFrame.column('newValues').set(mask);