dataFrame.column — copyTo()

Description

The copyTo() method of the column object copies the values of the selected column to the specified target column, creating it if necessary.

Signature

dataFrame.column(sourceColumnName).copyTo(targetColumnName)
Scope
dataFrame
Family
column
Returns
mutates

Arguments

sourceColumnName (string)
The name of the column to copy.
targetColumnName (string)
The name of the destination column.

Example

// copy the values of a 'revenue' column to a 'revenue copy' column
dataFrame.column('revenue').copyTo('revenue copy');