I would like to transform a table like
{<|"a" -> 1, "b" -> 11, "c" -> 111|>, <|"a" -> 1, "b" -> 12, "c" -> 112|>, <|"a" -> 2, "b" -> 22, "c" -> 111|>}
into an association that has the same keys and as values a list of the values in the original association, i.e.
{<|"a" -> {1, 1, 2}, "b" -> {11, 12, 22}, "c" -> {111, 112, 111}|>}
The way I did that was via
keys = Keys[as[[1]]]
values = Lookup[as, #] & /@ keys
AssociationThread[keys -> values]
Two questions:
Is there a more straightforward way?
if everything is wrapped in a Dataset, how can I do it (without reverting to Normal)?