2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: rename
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2020-05-14 00:36:08 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Creates a new table with columns renamed.
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> rename ...rest --column```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
- `...rest`: the new names for the columns
|
|
|
|
- `--column {list<string>}`: column name to be changed
|
2020-05-14 00:36:08 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Rename a column
|
2020-05-14 00:36:08 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> [[a, b]; [1, 2]] | rename my_column
|
2020-05-14 00:36:08 +00:00
|
|
|
```
|
2022-02-14 02:22:51 +00:00
|
|
|
|
|
|
|
Rename many columns
|
|
|
|
```shell
|
|
|
|
> [[a, b, c]; [1, 2, 3]] | rename eggs ham bacon
|
|
|
|
```
|
|
|
|
|
|
|
|
Rename a specific column
|
|
|
|
```shell
|
|
|
|
> [[a, b, c]; [1, 2, 3]] | rename -c [a ham]
|
|
|
|
```
|