mirror of
https://github.com/nushell/nushell.git
synced 2025-07-09 10:57:54 +02:00
# Description Provides functionality similar to https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.dataframe.group_by.GroupBy.first.html by allowing polars first to be used with a group by ``` > ❯ : [[a b c d]; [1 0.5 true Apple] [2 0.5 true Orange] [2 4 true Apple] [3 10 false Apple] [4 13 false Banana] [5 14 true Banana]] | polars into-df -s {a: u8, b: f32, c: bool, d: str} | polars group-by d | polars first | polars collect ╭───┬────────┬───┬───────┬───────╮ │ # │ d │ a │ b │ c │ ├───┼────────┼───┼───────┼───────┤ │ 0 │ Apple │ 1 │ 0.50 │ true │ │ 1 │ Banana │ 4 │ 13.00 │ false │ │ 2 │ Orange │ 2 │ 0.50 │ true │ ╰───┴────────┴───┴───────┴───────╯ ``` Additionally, I am setting the POLARS_ALLOW_EXTENSION to true to avoid panicking with operations using the dtype object. The conversion will fallback to object when the type cannot be determining, so this could be a common case. # User-Facing Changes - `polars first` can now be used with `polars group-by` --------- Co-authored-by: Jack Wright <jack.wright@nike.com>
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.