dataFrame.column — insertBefore()
Description
The insertBefore() method of the column object repositions the selected column immediately before the specified column.
Signature
dataFrame.column(sourceColumnName).insertBefore(targetColumnName)Arguments
sourceColumnName(string)- The name of the column to be placed.
targetColumnName(string)- The name of the column before which the selected column will be placed.
Example
// insert the 'revenue' column of the dataFrame before the 'old revenue' column
dataFrame.column('revenue').insertBefore('old revenue');