dataFrame.column.compare — eq()
Description
The eq() method of the compare object returns a boolean mask indicating which rows contain exactly the specified value.
Signature
dataFrame.column(columnName).compare.eq(value)Arguments
columnName(string)- The name of the column to compare values from.
value(any)- The value to compare against.
Returns
mask( boolean[] )- A boolean mask indicating the rows whose values are equal to the specified value.
- Equal to the value:
1 - Otherwise:
0
- Equal to the value:
Example
// higlight rows where the column 'name' contains exactly 'john'
var mask = df.column('name').compare.eq('john');
// set mask to dataFrame
df.column('eq_john').set(mask)