Sintaxe
M
Table.RenameColumns(table as table, renames as list, optional missingField as nullable number) as tableParâmetros
- tabletableObrigatório
Tabela cujas colunas serão renomeadas.
MTable.FromRecords({[CustomerNum = 1, Name = "Bob", Phone = "123-4567"]})- renameslistObrigatório
Par ou lista de pares com nome antigo e nome novo.
M{"CustomerNum", "CustomerID"}- missingFieldnullable numberOpcional
Comportamento quando a coluna não existe.
Retorna
tableExemplo
M
Table.RenameColumns(
Table.FromRecords({[CustomerNum = 1, Name = "Bob", Phone = "123-4567"]}),
{"CustomerNum", "CustomerID"}
)Resultado
M
Table.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"]})Mais informações
- Subgrupo
- Table