detect columns
for strings> detect columns {flags}
--skip, -s {int}
: number of rows to skip before detecting--no-headers, -n
: don't detect headers--combine-columns, -c {range}
: columns to be combined; listed as a rangeinput | output |
---|---|
string | table |
Splits string across multiple columns
>'a b c'|detect columns-n
╭───┬─────────┬─────────┬─────────╮
│# │ column0 │ column1 │ column2 │
├───┼─────────┼─────────┼─────────┤
│0│a│b│c│
╰───┴─────────┴─────────┴─────────╯
>$'c1 c2 c3 c4 c5(char nl)a b c d e'|detect columns-c0..1
Splits a multi-line string into columns with headers detected
>$'c1 c2 c3 c4 c5(char nl)a b c d e'|detect columns-c-2..-1
Splits a multi-line string into columns with headers detected
>$'c1 c2 c3 c4 c5(char nl)a b c d e'|detect columns-c2..
Parse external ls command and combine columns for datetime
> ^ls-lh|detect columns--no-headers--skip1--combine-columns5..7
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/detect_columns.html