Table.ReplaceErrorValues

構文

Table.ReplaceErrorValues(table as table, errorReplacement as list) as table

バージョン情報

table の指定された列のエラー値を、errorReplacement リストの新しい値に置換します。 リストの形式は {{column1, value1}, ...} です。 列ごとに 1 つの置換値のみ存在できます。列を複数回指定すると、エラーが発生します。

例 1

テーブル内のエラー値をテキスト "world" に置換します。

使用方法

Table.ReplaceErrorValues(
    Table.FromRows({{1, "hello"}, {3, ...}}, {"A", "B"}),
    {"B", "world"}
)

出力

Table.FromRecords({
    [A = 1, B = "hello"],
    [A = 3, B = "world"]
})

例 2

テーブル内の列 A のエラー値をテキスト "hello" に、列 B のエラー値をテキスト "world" に置換します。

使用方法

Table.ReplaceErrorValues(
    Table.FromRows({{..., ...}, {1, 2}}, {"A", "B"}),
    {{"A", "hello"}, {"B", "world"}}
)

出力

Table.FromRecords({
    [A = "hello", B = "world"],
    [A = 1, B = 2]
})