How to find frequency count for consecutive actions?

use

@chain data begin
     gatherby(:id, eachrow=true)
     transpose((2:ncol(data)-1, 3:ncol(data)))
     gatherby(r"_c")
     combine(1=>length)
end
3 Likes