nushell/crates
Eric Hodel 3dfe1a4f0e
group-by now returns a table instead of a record (#10848)
# Description

Previously `group-by` returned a record containing each group as a
column. This data layout is hard to work with for some tasks because you
have to further manipulate the result to do things like determine the
number of items in each group, or the number of groups. `transpose` will
turn the record returned by `group-by` into a table, but this is
expensive when `group-by` is run on a large input.

In a discussion with @fdncred [several
workarounds](https://github.com/nushell/nushell/discussions/10462) to
common tasks were discussed, but they seem unsatisfying in general.

Now when `group-by --to-table` is used a table is returned with the
columns "groups" and "items" making it easier to do things like count
the number of groups (`| length`) or count the number of items in each
group (`| each {|g| $g.items | length`)

# User-Facing Changes

* `group-by` returns a `table` with "group" and "items" columns instead
of a `record` with one column per group name

# Tests + Formatting

Tests for `group-by` were updated

# After Submitting

* No breaking changes were made. The new `--to-table` switch should be
added automatically to the [`group-by`
documentation](https://www.nushell.sh/commands/docs/group-by.html)
2023-10-28 14:15:14 -05:00
..
nu_plugin_custom_values Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu_plugin_example Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu_plugin_formats Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
nu_plugin_gstat Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu_plugin_inc Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
nu-cli Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
nu-cmd-base [nu-cmd-base] add missing LICENSE text (#10855) 2023-10-27 15:55:03 -05:00
nu-cmd-dataframe Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
nu-cmd-extra Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
nu-cmd-lang Fix describe -d for lazy records (#10836) 2023-10-25 08:04:37 -05:00
nu-color-config Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-command group-by now returns a table instead of a record (#10848) 2023-10-28 14:15:14 -05:00
nu-engine redirection: fix internal commands error with o+e> redirection (#10816) 2023-10-25 16:35:51 +02:00
nu-explore Finish removing profile command and related data (#10807) 2023-10-22 14:06:53 +03:00
nu-glob Allow filesystem commands to access files with glob metachars in name (#10694) 2023-10-18 13:31:15 -05:00
nu-json Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-parser redirect should have a target (#10835) 2023-10-25 11:19:35 +02:00
nu-path Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-plugin Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-pretty-hex Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-protocol Add common map-like API to nu_protocol::Record (#10841) 2023-10-28 15:18:41 +02:00
nu-std group-by now returns a table instead of a record (#10848) 2023-10-28 14:15:14 -05:00
nu-system Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-table Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-term-grid Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-test-support Bump version to 0.86.1 (#10755) 2023-10-18 13:00:51 -05:00
nu-utils sync $env.config.filesize.metric (#10277) 2023-10-25 16:42:24 +02:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.