dataFrame.column.str — prefixRemove()

Description

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

Signature

dataFrame.column(columnName).str.prefixRemove(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 remove from each value.

Returns

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

Example

// remove a prefix from the values of a column of the dataFrame
var mask = dataFrame.column('values').str.prefixRemove('prefix_');

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