nushell/crates
Andrés N. Robalino 5d59234f8d
Flexibility updating table's cells. (#4027)
Very often we need to work with tables (say extracted from unstructured data or some
kind of final report, timeseries, and the like).

It's inevitable we will be having columns that we can't know beforehand what their names
will be, or how many.

Also, we may end up with certain cells having values we may want to remove as we explore.

Here, `update cells` fundamentally goes over every cell in the table coming in and updates
the cell's contents with the output of the block passed. Basic example here:

```
> [

    [   ty1,       t2,       ty];

    [     1,        a, $nothing]
    [(wrap), (0..<10),      1Mb]
    [    1s,     ({}),  1000000]
    [ $true,   $false,   ([[]])]

] | update cells { describe }

───┬───────────────────────┬───────────────────────────┬──────────
 # │          ty1          │            t2             │    ty
───┼───────────────────────┼───────────────────────────┼──────────
 0 │ integer               │ string                    │ nothing
 1 │ row Column(table of ) │ range[[integer, integer)] │ filesize
 2 │ string                │ nothing                   │ integer
 3 │ boolean               │ boolean                   │ table of
───┴───────────────────────┴───────────────────────────┴──────────
```

and another one (in the examples) for cases, say we have a timeseries table generated and
we want to remove the zeros and have empty strings and save it out to something like CSV.

```
> [
    [2021-04-16, 2021-06-10, 2021-09-18, 2021-10-15, 2021-11-16, 2021-11-17, 2021-11-18];
    [        37,          0,          0,          0,         37,          0,          0]
] | update cells {|value| i
  if ($value | into int) == 0 {
    ""
  } {
    $value
  }
}

───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────
 # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18
───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────
 0 │         37 │            │            │            │         37 │            │
───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────
```
2021-09-19 15:37:54 -05:00
..
nu_plugin_binaryview bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_chart bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_from_bson bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_from_mp4 bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_from_sqlite bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_inc bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_match bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_query_json bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_s3 bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_selector add table selector for downloading web tables (#4004) 2021-09-16 09:02:30 -05:00
nu_plugin_start bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_textview bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_to_bson bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_to_sqlite bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_tree bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu_plugin_xpath bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-ansi-term bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-cli bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-command Flexibility updating table's cells. (#4027) 2021-09-19 15:37:54 -05:00
nu-completion Support completion when cursor inside an argument (#4023) 2021-09-19 17:23:05 +12:00
nu-data bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-engine add command g to switch shell quickly (#4014) 2021-09-17 10:39:14 +01:00
nu-errors bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-json bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-parser bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-path bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-plugin bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-pretty-hex bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-protocol add command g to switch shell quickly (#4014) 2021-09-17 10:39:14 +01:00
nu-serde bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-source bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-stream bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-table bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-test-support bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
nu-value-ext bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
README.md Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12: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 differnt capabilities like working with different file types, charting, viewing binary data, and more.