dataFrame.column.str — prefixAdd()

Description

The prefixAdd() method of the str object returns the values of the selected column with the specified prefix added.

Signature

dataFrame.column(columnName).str.prefixAdd(prefix)
Scope
dataFrame
Family
str
Returns
array

Argument

columnName (string)
The name of the column containing the values to transform.
prefix (string)
The prefix to add to each value.

Returns

mask ( string[] )
An array containing the transformed values.

Example

// add a prefix to the values of a column of the dataFrame
var mask = dataFrame.column('values').str.prefixAdd('prefix_');

// add values to the dataFrame
dataFrame.column('newValues').set(mask);