Hi Guys,
May you help me, please?
How can I use the groups obtained from a DataFrame with the Split-Apply-Combine Strategy as an argument for a function into another function? I have try to do it by three ways but it does not work. See below the three ways I have tried.
Thank you so much in advance
# V1
using Chain
using DataFramesMeta
function function_1(df_1::AbstractDataFrame, df_2::AbstractDataFrame)
@chain df_1 begin
groupby(:Column_ID)
@combine function_2([:,:], df_2)
end
end
# V2
function function_1(df_1::AbstractDataFrame, df_2::AbstractDataFrame)
combine(groupby(df_1, :Column_ID) .=> function_2([:,:], df_2) .=> :Result)
end
# V3
function function_1(df_1::AbstractDataFrame, df_2::AbstractDataFrame)
ID = groupby(df_1, :Column_ID)
combine(mgs, analysis_mgs(ID, df_2))
end