dataFrame.column.compare — gt()
Description
The gt() method of the compare object returns a boolean mask indicating which values are greater than the specified number.
Signature
dataFrame.column(columnName).compare.gt(number)Arguments
columnName(string)- The name of the column to compare values from.
number(number)- The value to compare against.
Returns
mask( boolean[] )- A boolean mask indicating the rows whose values are greater than the specified number.
- Greather than the number:
1 - Otherwise:
0
- Greather than the number:
Example
// higlight rows where the column 'revenue' contains a value greater than 1000
var mask = df.column('revenue').compare.gt(1000);
// set mask to dataFrame
df.column('gt_1k').set(mask)