ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
https://github.com/scicloj/tablecloth/issues/44
2
3
4
ds1ds2
5
6
:x:y:x:x:y
7
A1AA1
8
A2AA2
9
B3CA5
10
B4CB3
11
A5CB4
12
B6AB6
13
A
14
A
15
A
16
(tablecloth/group-by ds1 [:x])
(tablecloth/group-by ds2 [:x])
C
17
C
18
group-idnamedatagroup-idnamedataC
19
20
0{:x "A"}:x:y0{:x "A"}:x
21
A1A
22
A2A
23
A5A
24
25
1{:x "B"}:x:y1{:x "C"}:x
26
B3C
27
B4C
28
B6C
29
30
31
32
33
34
(tablecloth/bind (tablecloth/group-by ds1 [:x]) (tablecloth/group-by ds2 [:x]))
35
36
37
38
group-idnamedata
39
possible implementation (need to be tested on various scenarios): ungroup, bind, group again
40
0{:x "A"}:x:y
41
A1
42
A2:x:y
43
A5A1
44
AA2
45
AA5
46
AB3
47
B4
48
1{:x "B"}:x:yB6
49
B3A
50
B4A
51
B6A
52
C
53
2{:x "C"}:x:yC
54
CC
55
C
56
C
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100