WLJS LogoWLJS Notebook

Query

Query[op1, op2, ...] represents a query that can be applied to a Dataset, with successive operators applied at deeper levels.

Examples

Build and apply a query:

ds = Dataset[{<|"x" -> 1, "y" -> 2|>, <|"x" -> 3, "y" -> 4|>}]

(* Sum all x values *)
ds[Total, "x"]
(* 4 *)

(* Using Query explicitly *)
Query[All, "y"][ds]

Please visit the official Wolfram Language Reference for more details.

On this page