Ritchie Vink

@ritchie46.bsky.social

Author and Founder of Polars

We shipped a major release of Polars Cloud Live query profiles. See all data flowing through and exactly which nodes take up your compute. Aside from that it also lands: - Streaming shuffles - Defaulting to our cost based planner - Streaming and broadcasting ASOF joins github.com/pola-rs/pola...

Release Polars Cloud client 0.5.0 · pola-rs/polars-cloud-client

Highlights Launch of the Compute Dashboard This release marks the launch of the compute dashboard that is tied to the cluster directly. This allows for direct compute metrics and advanced query pr...

github.com

In 1-2 weeks we land live query profiling in Polars Cloud. See exactly how many rows are consumed and produced per operation. Which operation takes most runtime, and watch the data flow through live, like water. 😍

Bild

The pre-release of Polars 1.36 is out. Please give it a try so that we can ensure a stable final release with minimal regressions. It lands a lot of goodies: - Extension types - Lazy pivots - Streaming group_by_dynamic - Float16 support - Nested .over() expressions github.com/pola-rs/pola...

Release Python Polars 1.36.0-beta.2 · pola-rs/polars

🏆 Highlights Add Extension types (#25322) 🚀 Performance improvements Reduce HuggingFace API calls (#25521) Use strong hash instead of traversal for CSPE equality (#25537) Fix panic in is_between...

github.com

Join me the 24th in SF for a @pola.rs meetup! I will be having a talk about Polars, Polars-Cloud and the upcoming distributed engine. NVIDIA will also be doing a talk about their GPU acceleration with Polars-CuDF Hope to see you there! lu.ma/60b6wfs8

Polars Meetup - Polars Cloud and Acceleration · Luma

Join the second edition of our Polars Meetup with talks from Ritchie Vink (Polars) and Vyas Ramasubramani (NVIDIA) to discuss accelerating and scaling…

lu.ma

Polars has gotten 4x faster than Polars! 🚀 In the last months, the team has worked incredibly hard on the new-streaming engine and the results pay off. It is incredibly fast, and beats the Polars in-memory engine by a factor of 4 on a 96vCPU machine.

Bild

This weeks Polars release has a huge improvement for window functions. They can be an order of magnitude faster. And we can run 20/22 TPC-H queries on the new streaming engine and all on Polars cloud. More will follow soon! ;) See the full release docs here: github.com/pola-rs/pola...

Release Python Polars 1.20.0 · pola-rs/polars

⚠️ Deprecations Make parameter of str.to_decimal keyword-only (#20570) 🚀 Performance improvements Extend functionality on BitmapBuilder and use in Growables (#20754) Specialize first/last agg fo...

github.com

Recently I've been working on getting #polars running in #pyodide. This was a fun one, even requiring patches to LLVM's #wasm writer! Everything has now been upstreamed and earlier this week Pyodide v0.27.0 released, including a Wasm build of Polars usable in Pyodide, Shinylive and Quarto Live 🎉

A screenshot of a Pyodide REPL executing Polars code:

import polars as pl
import requests
r = requests.get("https://raw.githubusercontent.com/pola-rs/polars/refs/heads/main/examples/datasets/foods2.csv")
pl.read_csv(r.content).group_by("category").mean()A screenshot of a Quarto Live code cell executing Polars code:

import polars as pl
import requests
r = requests.get("https://raw.githubusercontent.com/pola-rs/polars/refs/heads/main/examples/datasets/foods2.csv")
pl.read_csv(r.content).group_by("category").mean()A screenshot of a Shinylive app using Polars code:

from shiny import App, render, ui
import polars as pl
from pathlib import Path

app_ui = ui.page_fluid(
    ui.input_select("cyl", "Select Cylinders", choices=["4", "6", "8"]),
    ui.output_data_frame("filtered_data")
)

def server(input, output, session):
    df = pl.read_csv(Path(__file__).parent / "mtcars.csv")
    
    @output
    @render.data_frame
    def filtered_data():
        return (df
                .filter(pl.col("cyl") == int(input.cyl()))
                .select(["mpg", "cyl", "hp"]))

app = App(app_ui, server)

✨ New temporal feature in the next Polars release! ⏲️ dt.replace lets you replace components of Date / Datetime columns ⚡🦀 It's an expressified vectorised rustified version of the Python standard library datetime.replace

demo of dt.replace

Why is there a `struct` data type? A single expression produces a single column, so expressions like `value_counts` need to output structs to map the values to their counts. With that said, do you understand why `.struct.unnest` doesn't break the 1 expr = 1 column principle?

Diagram showing how `value_counts` produces a column with struct values, mapping column values to their counts.
We then show how to use `.struct.field` to extract a single field from the struct and how to use `.struct.unnest` to extract all fields into corresponding columns.