nushell/docs/commands/transpose.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

767 B

title layout version
transpose command 0.59.0

Transposes the table contents so rows become columns and columns become rows.

Signature

> transpose ...rest --header-row --ignore-titles

Parameters

  • ...rest: the names to give columns once transposed
  • --header-row: treat the first row as column names
  • --ignore-titles: don't transpose the column names into values

Examples

Transposes the table contents with default column names

> echo [[c1 c2]; [1 2]] | transpose

Transposes the table contents with specified column names

> echo [[c1 c2]; [1 2]] | transpose key val

Transposes the table without column names and specify a new column name

> echo [[c1 c2]; [1 2]] | transpose -i val