looks like you have order dependency thus the task is not columnar. you can do it in a loop:
julia> b = similar(df.a, Int); b[1] = 1;
julia> for i in 2:10
b[i] = b[i-1] + (df.a[i] >= 0.5)
end
julia> df.b = b
looks like you have order dependency thus the task is not columnar. you can do it in a loop:
julia> b = similar(df.a, Int); b[1] = 1;
julia> for i in 2:10
b[i] = b[i-1] + (df.a[i] >= 0.5)
end
julia> df.b = b