dataFrame.column.str — trim()
Description
The trim() method of the str object returns the values of the selected column with leading and trailing characters removed.
Signature
dataFrame.column(columnName).str.trim(char)Argument
columnName(string)- The name of the column containing the values to trim.
char(string)- The character to remove from both ends of each value. If omitted, whitespace characters are removed.
Returns
mask( string[] )- An array containing the trimmed values.
Example
// trim the values of a column of the dataFrame
var mask = dataFrame.column('values').str.trim();
// add values to the dataFrame
dataFrame.column('newValues').set(mask);