Threading support for DataFrames transforms

You should not use transform! then but use standard Base Julia low-level operations like:

sl = SpinLock()
@threads for (incol, outcol, fun) in collect(zip(incols, outcols, funs))
    src = df[!, incol]
    dst = fun(src)
    lock(sl)
    df[!, outcol] = dst
    unlock(sl)
end
1 Like