dataFrame.header — set()

Description

The set() method of the header object replaces the header row with 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.set(columnNames)
Scope
dataFrame
Family
header
Returns
mutates

Argument

columnNames ( string[] )
The name of the columns used to replace the header row.

Example

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

// replace the header of the dataFrame
dataFrame.header.set(columnNames);