Joins
Table Joins
Table joins are accomplished through the join
function.
Appending Tables with the Same Columns
The merge
function will combine tables while maintaining the sorting of the primary key(s).
julia> t1 = table(1:5, rand(5); pkey=1)
Table with 5 rows, 2 columns:
1 2
─────────────
1 0.00750227
2 0.925756
3 0.792556
4 0.297881
5 0.698799
julia> t2 = table(6:10, rand(5); pkey=1)
Table with 5 rows, 2 columns:
1 2
────────────
6 0.65335
7 0.714516
8 0.163281
9 0.32673
10 0.493141
julia> merge(t1, t2)
Table with 10 rows, 2 columns:
1 2
──────────────
1 0.00750227
2 0.925756
3 0.792556
4 0.297881
5 0.698799
6 0.65335
7 0.714516
8 0.163281
9 0.32673
10 0.493141