Skip to content

Commit

Permalink
Update table.md (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsch committed Oct 7, 2023
1 parent 0a236fb commit 3d704a4
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions commands/docs/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,32 @@ Render data in table view
Render data in table view (expanded)
```nu
> [[a b]; [1 2] [2 [4 4]]] | table --expand
╭───┬───┬───╮
│ # │ a │ b │
├───┼───┼───┤
│ 0 │ 1 │ 2 │
│ 1 │ 3 │ 4 │
╰───┴───┴───╯
╭───┬───┬───────────╮
│ # │ a │ b │
├───┼───┼───────────┤
│ 0 │ 1 │ 2 │
│ 1 │ 2 │ ╭───┬───╮ │
│ │ │ │ 0 │ 4 │ │
│ │ │ │ 1 │ 4 │ │
│ │ │ ╰───┴───╯ │
╰───┴───┴───────────╯
```

Render data in table view (collapsed)
```nu
> [[a b]; [1 2] [2 [4 4]]] | table --collapse
╭───┬───┬───╮
│ # │ a │ b │
├───┼───┼───┤
│ 0 │ 1 │ 2 │
│ 1 │ 3 │ 4 │
╰───┴───┴───╯
╭───┬───╮
│ a │ b │
├───┼───┤
│ 1 │ 2 │
├───┼───┤
│ 2 │ 4 │
│ ├───┤
│ │ 4 │
╰───┴───╯
```

## Notes
If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index.
If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index.

0 comments on commit 3d704a4

Please sign in to comment.