dataFrame.column — set()

Description

The set() method of the column object replaces the values of the selected column with the specified values. If the column does not exist, a new column will be created.

Signature

dataFrame.column(columnName).set(values)
Scope
dataFrame
Family
column
Returns
mutates

Arguments

columnName (string)
The name of the column to set values in.
values (array)
The values to assign to the selected column.

Example

// replace the values of a 'revenue' column
var values = [...];
dataFrame.column('revenue').set(values);