← Back to context

Comment by ralegh

4 days ago

I personally found the polars API much clunkier, especially for rapid prototyping. I use it only for cemented processes where I could do with speed up/memory reduction.

Is there anything specific you prefer moving from the pandas API to polars?

Not OP but the ability to natively implement complex groupby logic is a huge plus for me at least.

Say you want to take an aggergation like "the mean of all values over the 75th percentile" algonside a few other aggregations. In pandas, this means you're gonna be in for a bunch of hoops and messing around with stuff because you can't express it via the api. Polars' api lets you express this directly without having to implement any kind of workaround.

Nice article on it here: https://labs.quansight.org/blog/dataframe-group-by