With the new Dataset/Background
option feature introduced in 12.1, I would like to highlight the rows when either of the two columns has one of the target values in its cell.
For example, I have the following data:
data = Transpose@Dataset@AssociationThread[{"a", "b", "c"}, RandomInteger[{1, 10}, {3, 10}]]
Iwould like to highlight those rows in red when either col a
or b
equals 1
or 10
.
I can highlight rows based on one-col value, but don't know how to add the 2nd col to the expression.
Dataset[data, Background -> (Switch[#3[#2[[1]], "a"], 1 | 10, LightRed, _, White] &)]
How can I do that? Thanks!