ColumnwiseCombine[{tab1,…}ckey]
通过连接所有在每个表对象 tabi 中键为 ckey 的列上具有相同值的行组合来合并 Tabular 对象 tab1,….
ColumnwiseCombine[{tab1,…}{ckey1,ckey2,…}]
合并键为 ckeyj 的列值相同的所有行的组合.
ColumnwiseCombine[{tab1ckey1,tab2ckey2,…}]
连接 tabi 中键为 ckeyi 的列上具有共同值的行.
ColumnwiseCombine[<|p1tab1,p2tab2,…|>]
在结果中使用 ExtendedKey[pi,ckeyij] 作为表格 tabi 中列键为 ckeyij 的前缀.
ColumnwiseCombine[<|p1tab1,p2tab2,…|>tfun]
包含所有满足 tfun[<|p1tab1[j1], p2tab2[j2], …|>] 为 True 的行组合,其中 1≤j1≤Length[tab1],1≤j2≤Length[tab2],….
ColumnwiseCombine[tabs,required]
必要时通过与其他 Tabular 对象的缺失元素行组合,包含由 required 指定的 Tabular 对象中的所有行.
ColumnwiseCombine
ColumnwiseCombine[{tab1,…}ckey]
通过连接所有在每个表对象 tabi 中键为 ckey 的列上具有相同值的行组合来合并 Tabular 对象 tab1,….
ColumnwiseCombine[{tab1,…}{ckey1,ckey2,…}]
合并键为 ckeyj 的列值相同的所有行的组合.
ColumnwiseCombine[{tab1ckey1,tab2ckey2,…}]
连接 tabi 中键为 ckeyi 的列上具有共同值的行.
ColumnwiseCombine[<|p1tab1,p2tab2,…|>]
在结果中使用 ExtendedKey[pi,ckeyij] 作为表格 tabi 中列键为 ckeyij 的前缀.
ColumnwiseCombine[<|p1tab1,p2tab2,…|>tfun]
包含所有满足 tfun[<|p1tab1[j1], p2tab2[j2], …|>] 为 True 的行组合,其中 1≤j1≤Length[tab1],1≤j2≤Length[tab2],….
ColumnwiseCombine[tabs,required]
必要时通过与其他 Tabular 对象的缺失元素行组合,包含由 required 指定的 Tabular 对象中的所有行.
更多信息和选项
- ColumnwiseCombine 通常用于将多个 Tabular 对象合并为单个对象.
- 使用两个 Tabular 对象 tab1 和 tab2 时,ColumnwiseCombine 实际上相当于 SQL JOIN.
- 规范 required 用于从 {tab1,…,tabn} 中要求行,其内容包括:
-
{} or "Inner" 仅包含匹配的行 Range[n] or "Outer" 包含所有表格的所有行 1 or "Left" 包含第一个表格的所有行 n or "Right" 包含最后一个表格的所有行 {i1,i2,…} 包含表格 tabii,tabi2,… 中的所有行 {pi1,pi2,…} 使用前缀来标识表格 - ColumnwiseCombine[p1tab1,p2tab2,…|>(True&)] 生成交叉联接.
范例
打开所有单元 关闭所有单元基本范例 (4)
{tab1 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], tab2 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> TypeSpecifier["Time"]["Integer64", "Instant", -6.]]],
"KeyColumns" -> None, "Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" ->
{4, {{{43200000000000, 50400000000000, 57600000000000, 64800000000000}, {}, None}},
None}, "ElementType" -> "Time"["Integer64", "Instant", -6.],
"CachedOriginalExpression" -> {TimeObject[{6, 0, 0.}, "Instant", -6.],
TimeObject[{8, 0, 0}, "Instant", -6.], TimeObject[{10, 0, 0}, "Instant", -6.],
TimeObject[{12, 0, 0}, "Instant", -6.]}]]}}]]]]};ColumnwiseCombine[{tab1, tab2} -> "a"]合并三个来自在列 "a" 和 "b" 中匹配的行的 Tabular 对象:
{tab1, tab2, tab3} =
{Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"e" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 2, 5}, "orand"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association["Data" -> {{5, 6}, {}, None},
"ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}]ColumnwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}, "Outer"]合并三个位于列 "a" 匹配的 Tabular 对象的行,使用前缀以避免在列 "b" 中发生冲突:
{tab1, tab2, tab3} =
{Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"e" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 2, 5}, "orand"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association["Data" -> {{5, 6}, {}, None},
"ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2, "γ" -> tab3|> -> "a"]ColumnwiseCombine[<|"α" -> tab1 -> "a", "β" -> tab2 -> "a", "γ" -> tab3 -> "a"|>]包含在 tab1 的列 "c" 与 tab3 的列 "b" 中有匹配项的所有行组合:
{tab1 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], tab2 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 8, 10}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], tab3 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"e" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 8}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{5, 6}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2, "γ" -> tab3|> -> Function[#α["c"] === #γ["b"]]]范围 (17)
匹配键 (2)
tab1 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]];tab2 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]];ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}]ColumnwiseCombine[{tab1, tab2} -> {"b", "a"}]给出所有行的组合,使得 tab1 中的列 "a" 和 "b" 的所有值与 tab2 中的列 "A" 和 "B" 的值都相同:
tab1 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "BackendData" ->
Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]];tab2 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["A" -> Association["ElementType" -> "Integer64"],
"B" -> Association["ElementType" -> "Integer64"],
"D" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 2, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 2, 4, 6}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 11, 10, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]];ColumnwiseCombine[{tab1 -> {"a", "b"}, tab2 -> {"A", "B"}}]不存在同时在列 "a" 与 "B" 以及列 "b" 与 "A" 上具有匹配值的行组合:
ColumnwiseCombine[{tab1 -> {"a", "b"}, tab2 -> {"B", "A"}}]在列 "a" 中,存在一个唯一的行组合,分别匹配来自 tab1 的数据,以及 "A" 和 "B" 来自 tab2 :
ColumnwiseCombine[{tab1 -> {"a", "a"}, tab2 -> {"A", "B"}}]该组合是来自 tab1 的第 3 行和来自 tab2 的第 2 行:
{aa3 = {tab1[3, "a"], tab1[3, "a"]}, AB2 = {tab2[2, "A"], tab2[2, "B"]}, aa3 == AB2}所需行数 (8)
{tab1, tab2} = { Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};combi = ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, "Inner"]这是默认设置,同时也等价于不要求必须包含 tab1 或 tab2 的所有行:
combi === ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}] === ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, {}]包含 tab1 和 tab2 中所有行的实例. 如果没有匹配,则用缺失值填充:
{tab1, tab2} = { Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};combo = ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, "Outer"]combo === ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, {1, 2}]使用参数 {2,1} 时,tab2 中未匹配的行会被放在 tab1 中未匹配的行之前:
ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, {2, 1}]{tab1, tab2} = { Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};combl = ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, {1}]使用 "Left" 进行指定是等价的,因为 tab1 是列表中最左边的:
combl === ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, "Left"]{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};combr = ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, {2}]使用 "Right" 来指定是等价的,因为 tab1 是列表中最左边的:
combr === ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}, "Right"]仅包含来自三个 Tabular 对象的行组合,这些组合中,列 "a" 的值匹配:
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};combi = ColumnwiseCombine[tabs -> {"a"}, "Inner"]combi === ColumnwiseCombine[tabs -> "a"] === ColumnwiseCombine[tabs -> "a", {}]包含来自三个 Tabular 对象的所有行的一个实例:
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};combo = ColumnwiseCombine[tabs -> {"a"}, "Outer"]combo === ColumnwiseCombine[tabs -> "a", {1, 2, 3}]展示对于三个 Tabular 对象,获取所需行的所有可能规范的结果:
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};possible = Permutations[{1, 2, 3}, {0, 3}]Map[Labeled[ColumnwiseCombine[tabs -> "a", #], #]&, possible]当没有匹配项时,使用 "Outer" 会有效地将 Tabular 对象叠加在一起:
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["c" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["e" -> Association["ElementType" -> "Integer64"],
"f" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};combo = ColumnwiseCombine[tabs -> Function[False], "Outer"]这相当于使用 Join:
Join@@tabs关键前缀与冲突 (2)
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> "a"]使用与 Association 一起提供的键前缀是必要的,因为列 "b" 存在冲突,其对应的值并不匹配:
ColumnwiseCombine[{tab1, tab2} -> "a"]当匹配列名通过特定的 Tabular 对象给出时,匹配到的列会以带前缀的名称包含在内:
ColumnwiseCombine[<|"α" -> tab1 -> "a", "β" -> tab2 -> "a"|>]包含来自两个 Tabular 对象的所有行,在列 "b" 的值匹配时合并这些行组合:
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> "b", "Outer"]ColumnwiseCombine[<|"α" -> tab1 -> "b", "β" -> tab2 -> "b"|> -> "a"]当匹配的列名以特定的 Tabular 对象给出时,匹配到的列将以带前缀的名称包含在内,并且在没有匹配时将包含缺失元素:
ColumnwiseCombine[<|"α" -> tab1 -> "b", "β" -> tab2 -> "b"|> -> "a", "Outer"]匹配测试函数 (5)
对三个 Tabular 对象进行交叉联接(即任意行的组合都视为匹配并被包含):
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["c" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["e" -> Association["ElementType" -> "Integer64"],
"f" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};cj = ColumnwiseCombine[tabs -> Function[True]]cj === ColumnwiseCombine[tabs -> Function[True], "Outer"]指定来自 tab1 的列 "a" 或 tab2 的列 "c" 的值相同:
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["c" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};comb = ColumnwiseCombine[{tab1, tab2} -> Function[#[[1]]["a"] === #[[2]]["c"]]]comb === ColumnwiseCombine[{tab1 -> "a", tab2 -> "c"}]该函数接收每个可能行组合的单一参数;对于来自 tab1 的第 i 行和来自 tab2 的第 j 行,参数是一个由 Association 对象组成的列表 {Normal[tab1[i]],Normal[tab2[j]]}:
ColumnwiseCombine[{tab1, tab2} -> Function[Echo[#];#[[1]]["a"] === #[[2]]["c"]]]使用 Apply 时,该函数获得两个参数,并且可以使用位置参数:
ColumnwiseCombine[{tab1, tab2} -> Apply[Function[#1["a"] === #2["c"]]]]当第一个参数为一个关联时,该函数会接收一个 Association 参数:
ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> Function[Echo[#];#α["a"] === #β["c"]]]查找在列 "a" 的值相同且列 "b" 的值长度也相同的行组合:
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]]};comb = ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> Function[(#α["a"] === #β["a"]) && (StringLength[#α["b"]] === StringLength[#β["b"]])]]查找在列 "a" 的数值奇偶性与列 "b" 的数值奇偶性相反的行组合:
{tab1, tab2} = { Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "BackendData" ->
Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 6, 8}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]};comb = ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> Function[EvenQ[#α["a"]] === EvenQ[#β["a"]] === OddQ[#α["b"]] === OddQ[#β["b"]]]]comb = ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> Function[EvenQ[#α["a"]] === EvenQ[#β["a"]] === OddQ[#α["b"]] === OddQ[#β["b"]]], "Outer"]包含在 tab1 和 tab2 中的列 "a", tab1 中的列 "c" 以及 tab3 中的列 "b" 中存在匹配项的所有行组合:
tabs = <|"α" -> Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"c" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 5, 6}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{7, 8, 9}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], "β" -> Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{2, 4, 8, 10}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{9, 10, 11, 12}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], "γ" -> Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"],
"e" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{4, 8}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{5, 6}, {}, None}, "ElementType" -> "Integer64"]]}}]]]]|>;ColumnwiseCombine[tabs -> Function[#α["a"] === #β["a"] && #α["c"] === #γ["b"]]]ColumnwiseCombine[tabs -> Function[#α["a"] === #β["a"] && #α["c"] === #γ["b"]], "Outer"]应用 (2)
将从导入的国家数据表中的数据与 Wolfram 的 "Country" 实体数据进行比较:
imported = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["CountryCode" -> Association["ElementType" -> "String"],
"latitude" -> Association["ElementType" -> "Real64"],
"longitude" -> Association["ElementType" -> "Real64"],
"name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66,
68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106,
108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140,
142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174,
176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208,
210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276,
278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310,
312, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342,
344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376,
378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410,
412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444,
446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478,
480, 482, 484, 486, 488}, "ADAEAFAGAIALAMANAOAQARASATAUAWAZBABBBDBEBFBGBHBIBJBMBNBOBR\
BSBTBVBWBYBZCACCCDCFCGCHCICKCLCMCNCOCRCUCVCXCYCZDEDJDKDMDODZECEEEGEHERESETFIFJFKFMFOFRGAGBGDGEGFGGG\
HGIGLGMGNGPGQGRGSGTGUGWGYGZHKHMHNHRHTHUIDIEILIMINIOIQIRISITJEJMJOJPKEKGKHKIKMKNKPKRKWKYKZLALBLCLILK\
LRLSLTLULVLYMAMCMDMEMGMHMKMLMMMNMOMPMQMRMSMTMUMVMWMXMYMZNCNENFNGNINLNONPNRNUNZOMPAPEPFPGPHPKPLPMPNP\
RPSPTPWPYQARERORSRURWSASBSCSDSESGSHSISJSKSLSMSNSOSRSTSVSYSZTCTDTFTGTHTJTKTLTMTNTOTRTTTVTWTZUAUGUMUS\
UYUZVAVCVEVGVIVNVUWFWSXKYEYTZAZMZW"}, {}, DataStructure["BitVector",
{"Data" -> ByteArray["/////////////////////////+///////////////w=="],
"Capacity" -> 245, "BitCount" -> 244}]}, "ElementType" -> "String",
"CachedOriginalExpression" -> {"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO",
"AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH",
"BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC",
"CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX",
"CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES",
"ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH",
"GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "GZ", "HK",
"HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS",
"IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW",
"KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA",
"MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS",
"MT", "MU", "MV", "MW", "MX", "MY", "MZ", Missing["NotAvailable"], "NC", "NE", "NF",
"NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH",
"PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU",
"RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN",
"SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL",
"TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ",
"VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM",
"ZW"}]], TabularColumn[Association["Data" -> {{42.546245, 23.424076, 33.93911,
17.060816, 18.220554, 41.153332, 40.069099, 12.226079, -11.202692, -75.250973,
-38.416097, -14.270972, 47.516231, -25.274398, 12.52111, 40.143105, 43.915886,
13.193887, 23.684994, 50.503887, 12.238333, 42.733883, 25.930414, -3.373056, 9.30769,
32.321384, 4.535277, -16.290154, -14.235004, 25.03428, 27.514162, -54.423199,
-22.328474, 53.709807, 17.189877, 56.130366, -12.164165, -4.038333, 6.611111,
-0.228021, 46.818188, 7.539989, -21.236736, -35.6 ... 676, 21.005859,
105.318756, 29.873888, 45.079162, 160.156194, 55.491977, 30.217636, 18.643501,
103.819836, -10.030696, 14.995463, 23.670272, 19.699024, -11.779889, 12.457777,
-14.452362, 46.199616, -56.027783, 6.613081, -88.89653, 38.996815, 31.465866,
-71.797928, 18.732207, 69.348557, 0.824782, 100.992541, 71.276093, -171.855881,
125.727539, 59.556278, 9.537499, -175.198242, 35.243322, -61.222503, 177.64933,
120.960515, 34.888822, 31.16558, 32.290275, Missing["NotAvailable"], -95.712891,
-55.765835, 64.585262, 12.453389, -61.287228, -66.58973, -64.639968, -64.896335,
108.277199, 166.959158, -177.156097, -172.104629, 20.902977, 48.516388, 45.166244,
22.937506, 27.849332, 29.154857}]], TabularColumn[
Association["Data" -> {{2, {0, 7, 27, 38, 57, 65, 72, 79, 99, 105, 115, 124, 138, 145,
154, 159, 169, 191, 199, 209, 216, 228, 236, 243, 250, 255, 262, 268, 275, 281, 288,
294, 307, 315, 322, 328, 334, 357, 368, 392, 408, 419, 433, 445, 450, 458, 463, 471,
481, 485, 495, 511, 517, 531, 538, 546, 553, 561, 579, 586, 593, 600, 605, 619, 626,
631, 639, 646, 650, 683, 693, 706, 712, 717, 731, 738, 745, 758, 766, 771, 780, 789,
795, 801, 811, 828, 834, 878, 887, 891, 904, 910, 920, 929, 962, 970, 977, 982, 989,
998, 1005, 1011, 1022, 1027, 1057, 1061, 1065, 1072, 1077, 1083, 1090, 1096, 1101,
1106, 1116, 1124, 1132, 1139, 1160, 1171, 1182, 1188, 1202, 1212, 1216, 1223, 1234,
1247, 1256, 1263, 1270, 1279, 1289, 1295, 1300, 1307, 1313, 1320, 1330, 1340, 1356,
1373, 1377, 1392, 1400, 1405, 1429, 1439, 1449, 1459, 1464, 1473, 1481, 1487, 1493,
1501, 1511, 1518, 1531, 1536, 1550, 1557, 1566, 1577, 1583, 1588, 1593, 1597, 1608,
1612, 1618, 1622, 1638, 1654, 1665, 1673, 1679, 1704, 1720, 1731, 1754, 1762, 1767,
1775, 1780, 1788, 1795, 1801, 1807, 1813, 1825, 1840, 1850, 1855, 1861, 1870, 1882,
1890, 1912, 1920, 1932, 1942, 1949, 1956, 1964, 1988, 1999, 2004, 2013, 2037, 2041,
2068, 2072, 2080, 2090, 2097, 2108, 2120, 2127, 2132, 2138, 2157, 2163, 2169, 2177,
2184, 2190, 2217, 2230, 2237, 2247, 2259, 2291, 2300, 2322, 2341, 2348, 2355, 2372,
2377, 2383, 2388, 2395, 2407, 2413, 2421}, "AndorraUnited Arab \
EmiratesAfghanistanAntigua and BarbudaAnguillaAlbaniaArmeniaNetherlands \
AntillesAngolaAntarcticaArgentinaAmerican SamoaAustriaAustraliaArubaAzerbaijanBosnia and \
HerzegovinaBarbadosBangladeshBelgiumBurkina \
FasoBulgariaBahrainBurundiBeninBermudaBruneiBoliviaBrazilBahamasBhutanBouvet \
IslandBotswanaBelarusBelizeCanadaCocos [Keeling] IslandsCongo [DRC]Central African RepublicCongo \
[Republic]SwitzerlandCôte d'IvoireCook IslandsChileCameroonChinaColombiaCosta RicaCubaCape \
VerdeChristmas IslandCyprusCzech RepublicGermanyDjiboutiDenmarkDominicaDominican \
RepublicAlgeriaEcuadorEstoniaEgyptWestern SaharaEritreaSpainEthiopiaFinlandFijiFalkland Islands \
[Islas Malvinas]MicronesiaFaroe IslandsFranceGabonUnited KingdomGrenadaGeorgiaFrench \
GuianaGuernseyGhanaGibraltarGreenlandGambiaGuineaGuadeloupeEquatorial GuineaGreeceSouth Georgia and \
the South Sandwich IslandsGuatemalaGuamGuinea-BissauGuyanaGaza StripHong KongHeard Island and \
McDonald IslandsHondurasCroatiaHaitiHungaryIndonesiaIrelandIsraelIsle of ManIndiaBritish Indian \
Ocean \
TerritoryIraqIranIcelandItalyJerseyJamaicaJordanJapanKenyaKyrgyzstanCambodiaKiribatiComorosSaint \
Kitts and NevisNorth KoreaSouth KoreaKuwaitCayman IslandsKazakhstanLaosLebanonSaint \
LuciaLiechtensteinSri \
LankaLiberiaLesothoLithuaniaLuxembourgLatviaLibyaMoroccoMonacoMoldovaMontenegroMadagascarMarshall \
IslandsMacedonia [FYROM]MaliMyanmar [Burma]MongoliaMacauNorthern Mariana \
IslandsMartiniqueMauritaniaMontserratMaltaMauritiusMaldivesMalawiMexicoMalaysiaMozambiqueNamibiaNew \
CaledoniaNigerNorfolk IslandNigeriaNicaraguaNetherlandsNorwayNepalNauruNiueNew \
ZealandOmanPanamaPeruFrench PolynesiaPapua New GuineaPhilippinesPakistanPolandSaint Pierre and \
MiquelonPitcairn IslandsPuerto RicoPalestinian \
TerritoriesPortugalPalauParaguayQatarRéunionRomaniaSerbiaRussiaRwandaSaudi ArabiaSolomon \
IslandsSeychellesSudanSwedenSingaporeSaint HelenaSloveniaSvalbard and Jan MayenSlovakiaSierra \
LeoneSan MarinoSenegalSomaliaSurinameSão Tomé and PríncipeEl SalvadorSyriaSwazilandTurks and Caicos \
IslandsChadFrench Southern \
TerritoriesTogoThailandTajikistanTokelauTimor-LesteTurkmenistanTunisiaTongaTurkeyTrinidad and \
TobagoTuvaluTaiwanTanzaniaUkraineUgandaU.S. Minor Outlying IslandsUnited \
StatesUruguayUzbekistanVatican CitySaint Vincent and the GrenadinesVenezuelaBritish Virgin \
IslandsU.S. Virgin IslandsVietnamVanuatuWallis and FutunaSamoaKosovoYemenMayotteSouth \
AfricaZambiaZimbabwe"}, {}, None}, "ElementType" -> "String"]]}}]]]];countryData = Tabular[EntityValue["Country", {"CountryCode", "Name", "Population", "Area"}, "PropertyAssociation"]]comb = ColumnwiseCombine[<|"imported" -> imported, "CountryData" -> countryData|> -> Function[SameQ[#imported["CountryCode"], #CountryData["CountryCode"]] && UnsameQ[#imported["name"], #CountryData["Name"]]]]comb[All, {ExtendedKey["CountryData", "CountryCode"], "Name", "name"}]ColumnwiseCombine[{countryData, imported} -> "CountryCode"]添加一个额外的列,显示在 Titanic 数据集的一个子集中,不同性别和舱位的生存率:
titanic = Take[ResourceData["Sample Tabular Data: Titanic"], 1 ;; -1 ;; 100]rates = AggregateRows[titanic, "sc survival rate" -> Function[Mean[Boole[#survived]]], {"sex", "class"}]ColumnwiseCombine[{titanic, rates} -> {"sex", "class"}]属性和关系 (4)
当没有匹配项时,使用 "Outer" 实际上是将 Tabular 对象进行合并:
tabs = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 2, 3}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{-2, 0, 2, 4}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["c" -> Association["ElementType" -> "Integer64"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{1, -1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["e" -> Association["ElementType" -> "Integer64"],
"f" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2, 0}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{-1, 0, 1}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]]};combo = ColumnwiseCombine[tabs -> {}, "Outer"]这相当于使用 Join:
Join@@tabs当只有两个 Tabular 对象且没有列冲突时,ColumnwiseCombine 和 JoinAcross 执行相同的操作:
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]]};ColumnwiseCombine[{tab1, tab2} -> {"a", "b"}]JoinAcross[tab1, tab2, {"a", "b"}]当存在键冲突时,JoinAcross 会使用一个键冲突函数(默认左侧):
JoinAcross[tab1, tab2, {"a"}]JoinAcross[tab1, tab2, {"a"}, KeyCollisionFunction -> Function[{ExtendedKey["left", #], ExtendedKey["right", #]}]]使用 ColumnwiseCombine 时,如果没有键前缀,不允许键冲突:
ColumnwiseCombine[{tab1, tab2} -> "a"]ColumnwiseCombine[<|left -> tab1, right -> tab2|> -> "a"]比较三元 ColumnwiseCombine 与嵌套的 JoinAcross:
tab1 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]];tab2 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]];tab3 = Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"e" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 2, 5}, "orand"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association["Data" -> {{5, 6}, {}, None},
"ElementType" -> "Integer64"]]}}]]]];ColumnwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}, "Inner"]pairwiseCombine[tabs_ -> ckeys_, req_] := Fold[JoinAcross[#1, #2, ckeys, req] &, First[tabs], Rest[tabs]]当列名一致且不需要额外的行时,这与 ColumnwiseCombine 一致:
pairwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}, "Inner"]ColumnwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}, "Outer"]pairwiseCombine[{tab1, tab2, tab3} -> {"a", "b"}, "Outer"]ColumnwiseCombine 实质上是行的外积:
{tab1, tab2} = {Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, 1, 2}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8}, "andorbut"}, {}, None},
"ElementType" -> "String"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["a" -> Association["ElementType" -> "Integer64"],
"b" -> Association["ElementType" -> "String"],
"d" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{0, 1, 1, 2}, {}, None}, "ElementType" ->
"Integer64"]], TabularColumn[Association["Data" -> {{3, {0, 3, 5, 8, 11},
"nororbutand"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{9, 10, 11, 12}, {}, None},
"ElementType" -> "Integer64"]]}}]]]]};testf = Function[#α["a"] === #β["a"] && StringLength[#α["b"]] === StringLength[#β["b"]]];
ColumnwiseCombine[<|"α" -> tab1, "β" -> tab2|> -> testf]{n1, n2} = Normal[{tab1, tab2}]prod = Outer[testf[<|"α" -> #1, "β" -> #2|>]&, n1, n2]matches = Position[prod, True]创建一个带有合并列的 Tabular 对象:
Tabular[MapApply[Join[n1[[#1]], n2[[#2]]]&, matches]]使用 ExtendedKey 可以得到与 ColumnwiseCombine 相同的结果:
extendKeys[p_, row_] := KeyMap[ExtendedKey[p, #]&, row];Tabular[MapApply[Join[extendKeys["α", n1[[#1]]], extendKeys["β", n2[[#2]]]]&, matches]]参见
相关指南
-
▪
- 表格转换
文本
Wolfram Research (2025),ColumnwiseCombine,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ColumnwiseCombine.html.
CMS
Wolfram 语言. 2025. "ColumnwiseCombine." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ColumnwiseCombine.html.
APA
Wolfram 语言. (2025). ColumnwiseCombine. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ColumnwiseCombine.html 年
BibTeX
@misc{reference.wolfram_2026_columnwisecombine, author="Wolfram Research", title="{ColumnwiseCombine}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ColumnwiseCombine.html}", note=[Accessed: 16-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_columnwisecombine, organization={Wolfram Research}, title={ColumnwiseCombine}, year={2025}, url={https://reference.wolfram.com/language/ref/ColumnwiseCombine.html}, note=[Accessed: 16-September-2026]}