JuliaDBMeta distinguishes row-wise macros (
@transform) where your are iterating through rows and symbols correspond to a given field and column-wise macros (
@transform_vec) where symbols correspond to columns and you will often need to use dot broadcasting in combination with the latter.
Note that both versions are required, as for example one may want:
@where_vec(df, :a .> mean(:a))
which can’t be achieved row by row.
I wonder whether DataFramesMeta could implement a similar strategy. I’m not sure how easy it is to implement row-wise macros efficiently due to type stability issues with DataFrames, but maybe there are ways around that.