top | item 45928650

(no title)

ardmiller | 3 months ago

Not super related but one complaint about Polars is I don't get why the departure from the pandas API...

discuss

order

cloud-oak|3 months ago

I was very reluctant about the polars syntax as well initally, but it has grown a lot on me.

Pandas syntax is super ergonomic for quick one-off analysis, but it becomes hard to read/maintain once your processing gets more complex.

For example, the innocent

    df[arg]
can mean wildly different things - does it filter rows? Subset columns? Extract a single column as a pd.Series? There really is no way of knowing except for checking the value of arg.

In contrast, polars syntax feals clunky initially, but it's much easier for me to revisit a pipeline and quickly understand what it does.