Reshape this Expr to a flat Series or a Series of Lists
Description
Reshape this Expr to a flat Series or a Series of Lists
Usage
<Expr>$reshape(dimensions)
Arguments
dimensions
|
A integer vector of length of the dimension size. If -1 is
used in any of the dimensions, that dimension is inferred. Currently,
more than two dimensions not supported.
|
Value
Expr. If a single dimension is given, results in an expression of the original data type. If a multiple dimensions are given, results in an expression of data type List with shape equal to the dimensions.
Examples
#> shape: (9, 1)
#> ┌─────┐
#> │ foo │
#> │ --- │
#> │ i32 │
#> ╞═════╡
#> │ 1 │
#> │ 2 │
#> │ 3 │
#> │ 4 │
#> │ 5 │
#> │ 6 │
#> │ 7 │
#> │ 8 │
#> │ 9 │
#> └─────┘
#> shape: (3, 1)
#> ┌───────────┐
#> │ foo │
#> │ --- │
#> │ list[i32] │
#> ╞═══════════╡
#> │ [1, 2, 3] │
#> │ [4, 5, 6] │
#> │ [7, 8, 9] │
#> └───────────┘
#> shape: (3, 1)
#> ┌───────────┐
#> │ foo │
#> │ --- │
#> │ list[i32] │
#> ╞═══════════╡
#> │ [1, 2, 3] │
#> │ [4, 5, 6] │
#> │ [7, 8, 9] │
#> └───────────┘
#> shape: (3, 1)
#> ┌───────────┐
#> │ foo │
#> │ --- │
#> │ list[i32] │
#> ╞═══════════╡
#> │ [1, 2, 3] │
#> │ [4, 5, 6] │
#> │ [7, 8, 9] │
#> └───────────┘