where
Filters the rows to format using a RowValueFilter.
See Row Condition.
You need to specify filter: A lambda function expecting a true result for each cell that should be included in the formatting selection. Both the cell value (it: C) and its row (this: DataRow<T>) are available.
For more information: See format on the documentation website.
Examples using where:
df.format { temperature }
.where { it !in -10..40 }
.with { background(red) }Check out the full Grammar.
Filter values in columns previously selected by gather using a filter.
RowValueFilter provides each value as a lambda argument, allowing you to filter rows using a Boolean condition.
It's an intermediate step; returns a new Gather with filtered value columns.
For more information: See gather on the documentation website.
See Grammar.
Examples
// Gather `resultA` and `resultB` columns into a single "value" column,
// with the "series" column containing a key.
// Only values greater than `pValue` are included.
df.gather { resultA and resultB }.where { it >= pValue }.into("series", "value")
// Gather values of all `String` columns
// into a single "tag" column, omitting the key column.
// Only non-empty strings are included.
df.gather { colsOf<String>() }.where { it.isNotEmpty() }.valuesInto("tag")Return
A new Gather with the filtered rows.
Parameters
The RowValueFilter used to specify the filtering condition for gathered values.
Where
Filter or find rows to operate on after selecting columns using a row value filter.
For example:
df.update{ length }.where{ it > 10.0 }
df.update{ cols(1..5) }.where{ index() > 4 && city != "Paris" }
For more information: See update on the documentation website.
Parameters
The row value filter to select the rows to update.