Get the latest tech news

Non-elementary group-by aggregations in Polars vs pandas


A closer look at non-elementary group-by aggregations

relies on GroupBy caching its groups performs in-place mutation of the original dataframe uses the fact that'max' skips over missing values Like this, we can express the operation cleanly and without hacks, meaning that any dataframe implementation which follows the Polars API has the possibility to evaluate this efficiently. If an API doesn't allow for an operation to be expressed and users end up using apply with custom Python lambda functions, then no amount of acceleration is going to make up for that.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Labs

Labs

Photo of Polars

Polars

Photo of pandas

pandas

Related news:

News photo

NumPy QuadDType: Quadruple Precision for Everyone

News photo

Rio: Web apps in pure Python

News photo

Google's Gemini-backed 'Ask Photos' opens its early access waitlist in Labs