to csv
for formats> to csv {flags}
--separator, -s {string}
: a character to separate columns, defaults to ','--noheaders, -n
: do not output the columns names as the first rowinput | output |
---|---|
record | string |
table | string |
Outputs an CSV string representing the contents of this table
> [[foobar]; [12]] |to csv
foo,bar
1,2
Outputs an CSV string representing the contents of this table
> [[foobar]; [12]] |to csv-s';'
foo;bar
1;2
Outputs an CSV string representing the contents of this record
> {a:1b:2} |to csv
a,b
1,2
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/to_csv.html