给定两个数据表 Frame。如何将它们组合(合并)在一帧中?
dt_f_A =
+--------+--------+--------+-----+--------+ | A_at_1 | A_at_2 | A_at_3 | ... | A_at_m | +--------+--------+--------+-----+--------+ | v_1 | | | | | +--------+--------+--------+-----+--------+ | ... | | | | | +--------+--------+--------+-----+--------+ | v_N | | | | | +--------+--------+--------+-----+--------+
dt_f_B =
+--------+--------+--------+-----+--------+ | B_at_1 | B_at_2 | B_at_3 | ... | B_at_k | +--------+--------+--------+-----+--------+ | w_1 | | | | | +--------+--------+--------+-----+--------+ | ... | | | | | +--------+--------+--------+-----+--------+ | w_N | | | | | +--------+--------+--------+-----+--------+
预期结果 (dt_f_A concat(combine or merge) dt_f_B)
+--------+--------+--------+-----+--------+------- -+--------+--------+-----+--------+ | A_at_1 | A_at_2 | A_at_3 | ... | A_at_m | B_at_1 | B_at_2 | B_at_3 | ... | B_at_k | +--------+--------+--------+-----+--------+------- -+--------+--------+-----+--------+ | v_1 | | | | | w_1 | | | | | +--------+--------+--------+-----+--------+------- -+--------+--------+-----+--------+ | ... | | | | | ... | | | | | +--------+--------+--------+-----+--------+------- -+--------+--------+-----+--------+ | v_N | | | | | w_N | | | | | +--------+--------+--------+-----+--------+------- -+--------+--------+-----+--------+
我们考虑三种情况:
案例1: a)两个框架具有完全相同的行数,并且b)列中的 唯一属性。
情况2:行数不同
案例3:属性不唯一(有重复)
@sammywemmy 感谢您的宝贵意见。