dataFrame.column.compare — endsWith()

Description

The endsWith() method of the compare object returns a boolean mask indicating which values end with the specified string.

Signature

dataFrame.column(columnName).compare.endsWith(string)
Scope
column
Family
compare
Returns
mask

Arguments

columnName (string)
The name of the column to compare values from.
string (string)
The string to match at the end of each value.

Returns

mask ( boolean[] )
A boolean mask indicating the rows whose values end with the specified string.
  • Ends with the string: 1
  • Otherwise: 0

Example

// higlight rows where value ends with 'at' in the column 'pet'
var mask = df.column('pet').compare.endsWith('at');

// set mask to dataFrame
df.column('pet_at').set(mask)