nushell/docs/commands/rotate.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

821 B

title layout version
rotate command 0.59.0

Rotates a table clockwise (default) or counter-clockwise (use --ccw flag).

Signature

> rotate ...rest --ccw

Parameters

  • ...rest: the names to give columns once rotated
  • --ccw: rotate counter clockwise

Examples

Rotate 2x2 table clockwise

> [[a b]; [1 2]] | rotate

Rotate 2x3 table clockwise

> [[a b]; [1 2] [3 4] [5 6]] | rotate

Rotate table clockwise and change columns names

> [[a b]; [1 2]] | rotate col_a col_b

Rotate table counter clockwise

> [[a b]; [1 2]] | rotate --ccw

Rotate table counter-clockwise

> [[a b]; [1 2] [3 4] [5 6]] | rotate --ccw

Rotate table counter-clockwise and change columns names

> [[a b]; [1 2]] | rotate --ccw col_a col_b