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.
Or read this on Hacker News