I am trying to run this loop using floops for parallelization. However, I am unable to push or append the data to an array.
a=[]
b=[]
@floop for i in 1:10
@reduce() do (r_df=filter(row-> row.col1==1, df))
result=mean(r_df.col3)
push!(a, result)
push!(b, i)
end
end
I tried using @reduce macro on the appending the data but it doesn't work. Any suggestion how to make this loop work?
Thanks in advance!