You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You would expect those to work the same, but they don't:
> [0 0 1 0 2 3 0 3 0 2 1 2] | group-by | get 0
Error: nu::shell::type_mismatch
× Type mismatch.
╭─[entry #156:1:1]
1 │ [0 0 1 0 2 3 0 3 0 2 1 2] | group-by | get 0
· ┬
· ╰── Can't access record values with a row index. Try specifying a column name instead
╰────
That's because one of them is a record with keys "0", "1", "2", and "3", and one is actually an array.
Describe the solution you'd like
Allow group-by to output arrays (probably behind a flag in order to not break things), and maybe an into array command or an enumerare -r (similar to transpose -r) or something like that to fix problems like this.
Describe alternatives you've considered
You can work around it with a few into ints, but it's annoying.
Additional context and details
No response
The text was updated successfully, but these errors were encountered:
This seems related to #12226 and the discussion there making group-by --to-table the default behavior.
In the default behavior the groups are records with "columns" which have strictly strings as keys.
Related problem
Short example:
You would expect those to work the same, but they don't:
That's because one of them is a record with keys "0", "1", "2", and "3", and one is actually an array.
Describe the solution you'd like
Allow group-by to output arrays (probably behind a flag in order to not break things), and maybe an
into array
command or anenumerare -r
(similar totranspose -r
) or something like that to fix problems like this.Describe alternatives you've considered
You can work around it with a few
into int
s, but it's annoying.Additional context and details
No response
The text was updated successfully, but these errors were encountered: