Complex DataFrames.jl transform by row

Probably you want:

transform(groupby(data, :uniqueID), AsTable(All()) => complex_calc => "newname")

if you want to work with all the columns.

However, note that in this case you can also just do:

[complex_calc(x) fo x in groupby(data, :uniqueID)]

(in which case the result will be a vector not a data frame, but sometimes you might prefer that.

4 Likes