I have the following dataframe and I need to concatenate all unique values of :c
check = DataFrame(a=[1,2,2],b=["a","b","b"],c=[0,1,0])
check2 = check |> @groupby([:a,:b]) |> @combine(vcat=>:c=>:ccat)
@test check2 == DataFrame(a=[1,2],b=["a","b"],c=[[0],[1,0]])
There is no @groupby
macro. .
I guess you want the following?
julia> combine(groupby(check, [:a, :b]), :c => Ref β unique => :ccat)
2Γ3 DataFrame
Row β a b ccat
β Int64 String Arrayβ¦
ββββββΌβββββββββββββββββββββββ
1 β 1 a [0]
2 β 2 b [1, 0]
2 Likes