Reilly Wood
9ce61dc677
Change group-by to accept cell paths ( #9020 )
...
Closes #9003 .
This PR changes `group-by` so that its optional argument is interpreted
as a cell path. In turn, this lets users use `?` to ignore rows that are
missing the column they wish to group on. For example:
```
> [{foo: 123}, {foo: 234}, {bar: 345}] | group-by foo
Error: nu:🐚 :column_not_found
× Cannot find column
╭─[entry #3:1:1]
1 │ [{foo: 123}, {foo: 234}, {bar: 345}] | group-by foo
· ─────┬──── ─┬─
· │ ╰── cannot find column 'foo'
· ╰── value originates here
╰────
> [{foo: 123}, {foo: 234}, {bar: 345}] | group-by foo?
╭─────┬───────────────╮
│ 123 │ [table 1 row] │
│ 234 │ [table 1 row] │
╰─────┴───────────────╯
```
~~This removes the ability to pass `group-by` a closure or block (I
wasn't able to figure out how to make the 2 features coexist), and so it
is a breaking change. I think this is OK; I didn't even know `group-by`
could accept a closure or block because there was no example for that
functionality.~~
2023-05-17 18:34:44 -05:00
..
2023-02-22 12:53:36 +00:00
2023-03-17 07:36:28 -05:00
2022-12-23 01:48:53 -05:00
2022-06-26 00:35:23 +03:00
2023-05-03 23:07:32 +02:00
2023-04-12 05:21:31 +12:00
2023-03-29 11:55:51 -07:00
2023-02-22 16:18:33 +00:00
2023-02-06 21:34:32 +01:00
2022-11-22 16:58:11 -08:00
2023-02-05 22:17:46 +01:00
2023-03-15 18:54:55 +13:00
2023-03-29 20:01:42 +13:00
2023-03-15 18:54:55 +13:00
2023-01-22 19:49:40 +01:00
2023-04-07 01:12:21 +03:00
2023-04-02 08:25:05 -07:00
2023-04-02 08:25:05 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-03-15 18:54:55 +13:00
2023-05-12 09:10:40 -05:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-15 17:11:02 +12:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2023-04-07 14:09:55 -07:00
2022-12-22 00:33:26 +02:00
2022-08-02 10:26:16 -05:00
2023-02-20 06:32:20 -06:00
2023-05-11 13:39:21 -05:00
2023-01-03 21:08:05 -08:00
2022-09-11 11:48:27 +03:00
2023-04-05 20:38:04 +03:00
2023-03-15 18:54:55 +13:00
2023-04-02 08:25:05 -07:00
2023-03-15 18:54:55 +13:00
2023-05-17 18:34:44 -05:00
2022-11-09 16:43:24 -08:00
2023-04-07 00:40:53 +03:00
2023-04-28 13:25:44 +02:00
2023-02-02 16:59:58 -06:00
2022-11-10 22:33:15 +01:00
2023-03-07 17:02:15 -06:00
2023-03-16 16:57:20 -07:00
2023-01-03 21:08:05 -08:00
2022-02-07 14:54:06 -05:00
2023-04-20 19:44:31 +02:00
2022-12-10 19:24:06 +02:00
2023-04-05 20:38:04 +03:00
2023-03-17 07:36:28 -05:00
2023-03-31 11:08:53 +13:00
2023-03-15 18:54:55 +13:00
2023-04-05 20:22:56 +03:00
2023-05-13 12:40:11 -05:00
2023-04-20 19:44:31 +02:00
2022-11-24 16:58:15 +13:00
2023-03-18 08:51:39 +13:00
2023-04-26 23:27:27 +02:00
2023-03-15 18:54:55 +13:00
2023-03-15 18:54:55 +13:00
2022-07-02 09:54:49 -05:00
2022-02-09 05:58:54 -05:00
2023-05-17 17:47:03 -05:00
2023-02-06 11:01:08 +01:00
2023-04-28 13:25:44 +02:00
2023-03-15 18:54:55 +13:00
2023-02-02 00:02:27 +01:00
last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists ( #7623 )
2022-12-31 13:35:12 +02:00
2023-03-18 08:58:13 +13:00
2023-03-15 18:54:55 +13:00
2022-09-11 11:48:27 +03:00
2023-04-28 07:55:48 -05:00
2023-02-24 15:31:33 -06:00
2023-03-28 12:40:29 -07:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-07 00:40:53 +03:00
2023-03-15 18:54:55 +13:00
2023-04-07 06:46:11 -05:00
2023-04-07 06:46:11 -05:00
2023-04-26 13:56:10 -05:00
2022-12-22 16:38:07 -08:00
2023-04-05 20:22:56 +03:00
2023-04-28 13:25:44 +02:00
2023-03-17 11:53:46 +13:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-03-23 09:14:10 +13:00
2023-04-28 13:25:44 +02:00
2023-02-27 20:44:05 +13:00
2023-04-05 20:38:04 +03:00
2023-03-17 11:53:46 +13:00
2023-03-15 18:54:55 +13:00
2023-01-29 19:37:54 -06:00