Using Polars in a Pandas world
Polars is a dataframe-based library that can be faster, more memory efficient, and often simpler to use than Pandas.
It’s also much newer, and correspondingly less popular.
In November 2023:
- Polars had ~2.6 million downloads from PyPI.
- Pandas had ~140 million downloads!
Because of Pandas’ popularity and decade and a half of availability, there are many third-party libraries with built-in support for Pandas, and others that specifically extend Pandas.
Many plotting and visualization libraries will accept Pandas dataframes as an input, for example, and GeoPandas adds geographical data types to Pandas dataframes.
If you’re using Polars, can you use these libraries?
And if so, how?
In this article we’ll cover the various integration options you have between Polars and third-party libraries originally designed to work with Pandas: