-
Notifications
You must be signed in to change notification settings - Fork 373
Open
Labels
Milestone
Description
SQL can be self documenting in joins when you prefix each column. For example:
select a.x, b.y
from tab1 a
inner join tab2 b on b.id = a.idIn DataFrames.jl, it's unclear where the columns came from:
df = innerjoin(tab1, tab2, on = :id)
select!(df, :x, :y)Was it discussed before how to make the code more self documenting?
A related issue is that I often have to limit the columns from the dataframes anyways before joining:
tab1_tmp = select(tab1, :id, :x)
tab2_tmp = select(tab2, :id, Not(3:10))
innerjoin(tab1_tmp, tab2_tmp, on = :id)So maybe it's more convenient if I were able to do this in one go:
innerjoin(tab1, tab2, on = :id, left_columns = [:x], right_columns = [:y])Thoughts?