3 ms·
I really do not see that much difference between polars and pandas. Under the hood, sure the machinery is different, but quite a bit of pandas code will run as-
by 3eb7988a1663 1y ago
I really do not see that much difference between polars and pandas. Under the hood, sure the machinery is different, but quite a bit of pandas code will run as-is with polars. If you want to maximize the performance + strictness, you do need to adopt the polars style, but the two are quite similar.
Which is to say, I have no real problems with the pandas API. In fact, if I could just transplant the polars strictness into pandas, that would let me keep the slightly more terse syntax.
- ritchie46 1y ago> but quite a bit of pandas code will run as-is with polars I highly doubt this. Aside from dataframe generation and series assignment, almost everything in the API surface is different. Strictness is also not something you can transplant easily. It is checking data types at the IR query planning level before you run the query and being able to resolve schema's independent of the data. In pandas schemas do depend on data within operations and therefore it isn't uncommon that data types change if data gets missing values nor can it check if a correct type is passed to an operation without running the compute.
- 3eb7988a1663 1y agoDepends on how you use pandas. Pre-polars I would do a lot of single column/series manipulation which works the same way (though heavily discouraged by polars because you lose out on optimization opportunities). There are plenty of surface level keyword API changes (merge vs join, sort_values vs sort), but you can operate polars in a very panda-esque manner which do not seem all that alien to each other. Strictness, I understand you cannot just slap it in, more just an idle thought.