mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 18:03:51 +01:00
doc: add headers command page (#1775)
This commit is contained in:
parent
cb24a9c7ea
commit
34b5e5c34e
23
docs/commands/headers.md
Normal file
23
docs/commands/headers.md
Normal file
@ -0,0 +1,23 @@
|
||||
# headers
|
||||
|
||||
Use `headers` to turn the first row of a table into meaningful column names.
|
||||
|
||||
As demonstrated in the following example, it's particularly handy when working with spreadsheets.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell
|
||||
❯ open sample_data.ods | get SalesOrders
|
||||
────┬────────────┬─────────┬──────────┬─────────┬─────────┬───────────┬───────────
|
||||
# │ Column0 │ Column1 │ Column2 │ Column3 │ Column4 │ Column5 │ Column6
|
||||
────┼────────────┼─────────┼──────────┼─────────┼─────────┼───────────┼───────────
|
||||
0 │ OrderDate │ Region │ Rep │ Item │ Units │ Unit Cost │ Total
|
||||
1 │ 2018-01-06 │ East │ Jones │ Pencil │ 95.0000 │ 1.9900 │ 189.0500
|
||||
|
||||
❯ open sample_data.ods | get SalesOrders | headers
|
||||
────┬────────────┬─────────┬──────────┬─────────┬─────────┬───────────┬───────────
|
||||
# │ OrderDate │ Region │ Rep │ Item │ Units │ Unit Cost │ Total
|
||||
────┼────────────┼─────────┼──────────┼─────────┼─────────┼───────────┼───────────
|
||||
0 │ 2018-01-06 │ East │ Jones │ Pencil │ 95.0000 │ 1.9900 │ 189.0500
|
||||
1 │ 2018-01-23 │ Central │ Kivell │ Binder │ 50.0000 │ 19.9900 │ 999.4999
|
||||
```
|
Loading…
Reference in New Issue
Block a user