Table.SplitAt

Table.SplitAt(table as table, count as number) as list

关于

返回一个列表,其中包含两个表:一个表包含 table 的前 N 行(由 count 指定),一个表包含 table 的其余行。 如果结果列表的表仅枚举一次并按顺序排列,则该函数将只枚举 table 一次。

示例 1

返回表的前 2 行和表的其余行。

使用情况

Table.SplitAt(#table({"a", "b", "c"}, {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}), 2)

输出

{
    #table({"a", "b", "c"}, {{1, 2, 3}, {4, 5, 6}}),
    #table({"a", "b", "c"}, {{7, 8, 9}})
}