nushell/docs/commands/compact.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

600 B

title layout version
compact command 0.59.0

Creates a table with non-empty rows.

Signature

> compact ...columns

Parameters

  • ...columns: the columns to compact from the table

Examples

Filter out all records where 'Hello' is null (returns nothing)

> echo [["Hello" "World"]; [$nothing 3]]| compact Hello

Filter out all records where 'World' is null (Returns the table)

> echo [["Hello" "World"]; [$nothing 3]]| compact World

Filter out all instances of nothing from a list (Returns [1,2]

> echo [1, $nothing, 2] | compact