Summary

By now you should have a good idea of what Polars can do and how it compares to Pandas.

Reasons to use Polars

  • It’s really fast.
  • It has a nice API.
  • It does most of the things Pandas does. The biggest missing things are plotting and some I/O methods.
  • It’s available in Python, Rust, NodeJS and Ruby. This is partly because most of the code is written in Rust, and calling Rust in other languages works much better than calling Python.
  • The lead dev is very productive and quick to fix bugs.

Reasons not to use Polars

Bugs

By my count I ran into 11 bugs while writing this book. They were fixed quickly and tests were added to make sure they don’t happen again, but it all makes me feel somewhat uneasy. It’s not like Pandas hasn’t gone through a whole insectarium of bugs, but Polars probably has more right now due to being newer.

If it ain’t broke, don’t fix it

Suppose you have a bunch of important stuff in another library that works fine, even if it’s a bit slow. Maybe it doesn’t have good tests. Switching library is tricky and may not be worth it here. Even if Polars is bug-free, various default behaviours might differ from your expectations.

API stability

Since Polars is young and has not made a 1.0 release yet, the API is subject to breaking changes. Indeed, it has quite a few features that are explicitly labelled as experimental.

Other cool stuff you might like

  • r-polars, a work-in-progress project bringing Polars to R.
  • tidypolars: an API for py-polars that should be familiar to R Tidyverse users.
  • DuckDB: not a dataframe library, but can do a lot of what Polars does and is often mentioned in the same breath.