dataFrame.column.compare — in()
Description
The in() method of the compare object returns a boolean mask indicating which values match one of the specified values.
Signature
dataFrame.column(columnName).compare.in(values)Arguments
columnName(string)- The name of the column to compare values from.
values(array)- The list of values to compare against.
Returns
mask( boolean[] )- A boolean mask indicating the rows whose values match one of the specified values.
- Matching value:
1 - Otherwise:
0
- Matching value:
Example
// higlight rows where the column 'name' contains 'john' or 'Jane'
var mask = df.column('name').compare.in(['john', 'Jane']);
// set mask to dataFrame
df.column('in_names').set(mask)