Let's assume I created the following dataset:
Dataset[{<|"x" -> a1, "y" -> b1, "z" -> c1|>, <|"x" -> a2, "y" -> b2,
"z" -> c2|>, <|"x" -> a3, "y" -> b3, "z" -> c3|>}]
So if I have 3 list of parameters:
a = {a1, a2, a3};
b = {b1, b2, b3};
c = {c1, c2, c3};
How can I generate automatic Dataset using slots and pure functions without writing each association explicitly.
I have tried somthing like:
dataset =
Dataset[{<|"x" -> #1, "y" -> #2, "z" -> #3|> & @@ {a, b, c}}]
but the output is not what I wanted it to be:
Any ideas, or other solutions to create dataset from the given lists??
Thanks!
Dataset[AssociationThread[{"x", "y", "z"} -> #] & /@ Transpose[{a, b, c}]]
. $\endgroup$