Skip to content

join overwrites values if column names are same #293

@chiraganand

Description

@chiraganand
julia> t1
Table with 30 rows, 2 columns:
year  value
────────────
1875  580.38
1876  581.86
1877  580.97
1878  580.8
1879  579.79
1880  580.39
1881  580.42
1882  580.82
1883  581.4
1884  581.32
1885  581.44
1886  581.68
...

julia> t4
Table with 10 rows, 2 columns:
year  value
────────────────
1876  0.98708
1877  0.750343
1881  0.00385515
1883  0.765223
1886  0.0338463
1891  0.229595
1892  0.0750288
1894  0.722249
1902  0.838551
1903  0.397564

The following code should have returned 2 columns with both values, say, value.t1 and value.t4 but it returns only a single column overwriting with values from t4:

julia> join(t1, t4, how = :outer)
Table with 30 rows, 2 columns:
year  value
────────────────
1875  missing
1876  0.98708
1877  0.750343
1878  missing
1879  missing
1880  missing
1881  0.00385515
1882  missing
1883  0.765223
1884  missing
1885  missing
1886  0.0338463
1887  missing
1888  missing
1889  missing
1890  missing
1891  0.229595
1892  0.0750288
1893  missing
1894  0.722249
1895  missing
1896  missing
1897  missing
1898  missing
1899  missing
1900  missing
1901  missing
1902  0.838551
1903  0.397564
1904  missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions