Table.ReplaceErrorValues
使用相应指定值替换指定列中的错误值。
Syntax
Table.ReplaceErrorValues(
table as table,
errorReplacement as list
) as table
Remarks
使用 errorReplacement 列表中的新值替换 table 指定列中的错误值。列表的格式为 {{column1, value1}, …}。每列可能只有一个替换值,多次指定列将导致错误。
Examples
Example #1
在表中将错误值替换为文本 "world"。
Table.ReplaceErrorValues(
Table.FromRows({{1, "hello"}, {3, ...}}, {"A", "B"}),
{"B", "world"}
)
Result:
Table.FromRecords({
[A = 1, B = "hello"],
[A = 3, B = "world"]
})
Example #2
在表中将 A 列中的错误值替换为文本 "hello",将 B 列中的错误值替换为文本 "world"。
Table.ReplaceErrorValues(
Table.FromRows({{..., ...}, {1, 2}}, {"A", "B"}),
{{"A", "hello"}, {"B", "world"}}
)
Result:
Table.FromRecords({
[A = "hello", B = "world"],
[A = 1, B = 2]
})
Category
Table.Transformation