renameColumns
The renameColumns
method creates a new table with the specified columns renamed.
Syntax
table.renameColumns(pairs)
Parameters
Parameter | Type | Description |
---|---|---|
pairs | Collection<Pair> | The column rename expressions, e.g., |
Returns
A new table with the specified columns renamed.
Examples
source = newTable(
stringCol("A", "Some", "string", "values", "here"),
intCol("B", 1, 2, 3, 4),
stringCol("C", "more", "strings", "over", "here"),
)
result = source.renameColumns("X = A", "Y = B", "Z = C")
- result
- source