Live data from Hacker News

Python Polars Cheatsheet (based on our O'Reilly book)

opensource.posit.co

41–44 of 44 posts

Re: Python Polars Cheatsheet (based on our O'Reilly book)

#41
post #18

Earlier quoted context omitted.

even for just in-memory quick data analysis?

spinning up a venv with duckdb: 5 minutes using sql everywhere; never having to remember dataframe syntax: timeless

what is the visualisation strategy here? I find post-hoc grouping and plotting in pandas pretty satisfying.

Re: Python Polars Cheatsheet (based on our O'Reilly book)

#42
post #40

Earlier quoted context omitted.

Agreed, as an R and polars user. The fundamental advantage R holds over other languages/libraries is expressions. The ability to reference columns directly AND interoperate with vectorized base ops in R is unfair. Of course, this super power is equally confusing to learners, fraught for production code, etc.

do you have a snippet of what this looks like in R?

Not OP, but here is an example using tidyverse (I leave the meaning of it to you; should be clear without any R knowledge):

  purchases |>
    group_by(country) |>
    filter(amount 
    summarize(total = sum(amount - discount))

Re: Python Polars Cheatsheet (based on our O'Reilly book)

#44
post #41
post #18

Earlier quoted context omitted.

spinning up a venv with duckdb: 5 minutes using sql everywhere; never having to remember dataframe syntax: timeless

what is the visualisation strategy here? I find post-hoc grouping and plotting in pandas pretty satisfying.

Check out malloyyo on github
Post reply on HN