Skip to content

Comment on What would it take to recreate dplyr in Python? (2020)

Comments

As a comparison to another language: for Julia there is DataFrames.jl: https://dataframes.juliadata.org/stable/

Comparison to dplyr, ...: https://dataframes.juliadata.org/stable/man/comparisons/#Com...

Comparison to Pandas: https://dataframes.juliadata.org/stable/man/comparisons/#Com...

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/

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.