Reading and writing other data file formats
There are many other formats aside from the ones introduced earlier. Polars keeps adding features to work with more formats in its frequent updates. We’ll be going over a few other data file formats to read from and write to in Polars.
In this recipe, we’ll cover reading from and/or writing to the Arrow IPC format, Apache Avro, and Apache Iceberg.
These file formats are not as common as the other ones we covered in earlier recipes. However, there are still use cases where companies and people need to work with these formats.
Getting ready
You’ll need to install a few other libraries other than Polars for this recipe. They are pyiceberg
, numpy
, and pyarrow
. Run the following commands in Terminal to install them if you haven’t already:
>>> pip install pyiceberg >>> pip install numpy >>> pip install pyarrow
How to do it...
Here are the steps for working with other data...