Try rewriting your input expression not as a list of associations ("column" form), but in "row" form inside a single association. Note the absence of the surrounding brackets; top level head (inside Dataset
) is Association
, not List
— see the Wolfram Language documentation on Dataset
:
dataset = Dataset[<|"t"->{-3,-2,-1,0,1,2,3},"v"->{4,-1,3,0,2,-2,5}|>];
Normal@ %
(* <|t->{-3,-2,-1,0,1,2,3},v->{4,-1,3,0,2,-2,5}|> *)
Because the keys are in the top level, you can get key "v" value simply using:
dataset["v"];
Normal@ %
(* {4,-1,3,0,2,-2,5} *)
Interestingly, if you transpose this dataset, it returns the "column" form (list of associations):
dataset2 = dataset[Transpose];
Normal@ %
(* {<|t->-3,v->4|>,<|t->-2,v->-1|>,<|t->-1,v->3|>,<|t->0,v->0|>,<|t->1,v->2|>,<|t->2,v->-2|>,<|t->3,v->5|>} *)
Now you can interrogate dataset2
using your original query expression:
dataset2[All,"v"];
Normal@ %
(* {4,-1,3,0,2,-2,5} *)
Hope this helps.