df = DataFrame(a=[1,1,2,2], b =[3,3,4,4])
dfg = groupby(df,:a)

further suppose I have a function fun1 that takes a vector x and multiple arguments y, z.

function fun1(x,y,z)
for i = eachindex(x)
x[i] = (x[i]+y)^z
end
end

Is there a way to pass the fun1 transformation via the source_column => transformation => target_column_name format? I tried using an anonymous function in parenthesis but it yielded

Thanks so much this clears up a lot! I think that with the simple fun1, transform! can easily be modified to acommodate a y that is in a different column but the same row of dfg with something like

Which yields fun1(dfg[k].a[j], dfg[k].b[j],2) into newcol.

But what if y or z is drawn from a different row of the DataFrame, e.g. if the desired output for newcol is fun1( dfg[k].a[j], dfg[k].b[ j+1 ], 2 ). Can transform with the minilaguage be modified to accommodate operations on different rows or in this case is it better to just modify fun1 or shift col b?