Column names not feed through to named tuple.
@chain begin
DataFrame(A=1, B=2)
@rtransform :X = (;:A , :B)
end
Produces :X = (##1262 = 1, ##1263 = 2) Can it instead produce? :X = (A=1, B=2)
This is not a DataFrames.jl related issue, so I am closing it.
The short answer is that you should write:
@rtransform(df, :X = (a=:A , b=:B))
But this is probably not something you are looking for. If you are not satisfied with it can you please re-open the issue in DataFramesMeta.jl (for some reason I am not able to transfer your issue).
However, in general, I do not think what you want is possible as (; A, B) syntax is resolved on parser level, and there are no A and B variables defined in the scope of @rtransform and there cannot be such variables defined - we need to use gensym to make sure we do not introduce conflicting variable names.
CC @pdeffebach
I'm going to re-open to think about it some more. It's a reasonable request and maybe i can think of something. But I am pessimistic, given the fact that it's handled at the parser level.
Ah - sorry for closing. For some reason I thought the issue was opened in DataFrames.jl. My bad. Of course it should be kept open here.