using DataFrames
df = DataFrame(a=1:3, b=1:3)
How do I create a new column c
such that c = a+b
element wise?
Can't figure it out by reading the transform
doc.
I know that
df[!, :c] = df.a .+ df.b
works but I want to use transform
in a chain like this
@chain df begin
@transform(c = :a .+ :b)
@where(...)
groupby(...)
end
The above syntax doesn't work with DataFramesMeta.jl