4 ms·
Using DataFramesMeta.jl [1], the code from the first example turns out pretty similar: using DataFramesMeta, Statistics @chain mtcars begin @se
by sundarurfriend 5y ago
Using DataFramesMeta.jl [1], the code from the first example turns out pretty similar:
using DataFramesMeta, Statistics
@chain mtcars begin
@select :Cyl :HP
groupby(:Cyl)
@transform _ begin
:dumb_result = myarbitraryfunc.(:HP)
:demeaned = :HP .- mean(:HP)
end
end
(mtcars is from RDataSets.jl)
[1] https://juliadata.github.io/DataFramesMeta.jl/stable/dplyr/ https://juliadata.github.io/DataFramesMeta.jl/stable/dplyr/