Remix.run Logo
aquafox 3 hours ago

Coming from an R/dplyr background, I agree. Compare

df.select(

  pl.col("x"),
  (pl.col("w")/pl.col("z")).alias("y")
)

with

df |> select(x, y = w/z)

orlp 3 hours ago | parent | next [-]

    from polars import col as C

    df.select(C.x, y = C.w / C.z)
dkga an hour ago | parent [-]

Still, it’s a very good approximation but still an approximation to the more ergonomic and expressive tidyverse syntax

jcattle 2 hours ago | parent | prev | next [-]

R really is/was the superior traditional data science language. Python ecosystem is slowly catching up though.

ggplot vs matplotlib

dplyr vs pandas

And I loved that everything in RStudio was so easily inspectable. Have a huge dataframe? Just look at it right in your IDE.

vovavili 2 hours ago | parent [-]

Altair and Positron should be just as good for your Polars @ Python needs. With software like Marimo notebooks and VegaFusion, Polars/Python experience starts beating R by quite a substantial margin.

countrymile 30 minutes ago | parent | prev | next [-]

Polars is a world away from pandas, but I feel that dplyr still offers the most simple and understandable introduction to data analysis for the beginner. The above is a good example of this.

bobson_dugnutt5 3 hours ago | parent | prev [-]

Fair point, but you can do something like

`df.select("x", y=pl.col.w/pl.col.z)`