And :b and :c at the same time can probably only really be handled by stacking them, because they don’t correspond to each other:
@chain dd begin
stack([:b, :c])
groupby([:a, :variable, :value])
combine(nrow => :count)
end
7×4 DataFrame
Row │ a variable value count
│ String String String Int64
─────┼─────────────────────────────────
1 │ a b no 2
2 │ b b yes 1
3 │ b b no 1
4 │ a c lo 1
5 │ b c lo 1
6 │ a c hi 1
7 │ b c hi 1