dataFrame.column.compare — lte()
Description
The lte() method of the compare object returns a boolean mask indicating which values are lower than or equal to the specified number.
Signature
dataFrame.column(columnName).compare.lte(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 lower than or equal to the specified number.
- Lower than or equal to the number:
1 - Otherwise:
0
- Lower than or equal to the number:
Example
// higlight rows where the column 'revenue' contains a value lower than or equal to 2000
var mask = df.column('revenue').compare.lte(2000);
// set mask to dataFrame
df.column('lte_2k').set(mask)