Functions mimic pandas apply(list)

if you want to avoid copying data:

julia> combine(groupby(ds, :a), :b => Ref => :b)
2×2 DataFrame
 Row │ a      b
     │ Int64  SubArray…
─────┼──────────────────────────────────
   1 │     1  ['a', 'b', 'c', 'd', 'e']
   2 │     2  ['f', 'g', 'h', 'i', 'j']

and if you wan to copy:

julia> combine(groupby(ds, :a), :b => Ref∘copy => :b)
2×2 DataFrame
 Row │ a      b
     │ Int64  Array…
─────┼──────────────────────────────────
   1 │     1  ['a', 'b', 'c', 'd', 'e']
   2 │     2  ['f', 'g', 'h', 'i', 'j']
1 Like