dataFrame.header — add()

Description

The add() method of the header object creates a header row from the specified column names. Column names must be non-empty unique strings and must match the number of columns in the DataFrame.

Signature

dataFrame.header.add(columnNames)
Scope
dataFrame
Family
header
Returns
mutates

Argument

columnNames (array)
The name of the columns used to create the header row.

Example

// header for a dataFrame with 2 columns
var columnNames = [ 'col_1', 'col_2' ];

// add the header to the dataFrame
dataFrame.header.add(columnNames);