nushell/crates/nu-cmd-dataframe/src/dataframe
Ian Manske aec41f3df0
Add Span merging functions (#12511)
# Description
This PR adds a few functions to `Span` for merging spans together:
- `Span::append`: merges two spans that are known to be in order.
- `Span::concat`: returns a span that encompasses all the spans in a
slice. The spans must be in order.
- `Span::merge`: merges two spans (no order necessary).
- `Span::merge_many`: merges an iterator of spans into a single span (no
order necessary).

These are meant to replace the free-standing `nu_protocol::span`
function.

The spans in a `LiteCommand` (the `parts`) should always be in order
based on the lite parser and lexer. So, the parser code sees the most
usage of `Span::append` and `Span::concat` where the order is known. In
other code areas, `Span::merge` and `Span::merge_many` are used since
the order between spans is often not known.
2024-05-16 22:34:49 +00:00
..
eager Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
expressions Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
lazy Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
series Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
values Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
mod.rs Add a stub dfr command (#10683) 2023-10-11 17:51:20 +02:00
README.md move dataframe commands to nu-cmd-dataframe (#9241) 2023-05-19 10:56:08 -07:00
stub.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
test_dataframe.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
utils.rs Make FromValue take owned Values (#10900) 2023-10-31 19:47:00 +01:00

Dataframe

This dataframe directory holds all of the definitions of the dataframe data structures and commands.

There are three sections of commands:

For more details see the Nushell book section on dataframes