dataFrame.columns — add()

Description

The add() method of the columns object adds one or more columns to the DataFrame.

Signature

dataFrame.columns.add(values)
Scope
dataFrame
Family
columns
Returns
mutates

Argument

columns (array)
The column values to add. Each inner array represents a column.

Example

// add columns to the dataFrame
var columns = [
  ['col_1', 'col_2'],
  [1, 2]
];
dataFrame.columns.add(columns);