(as given at PyCon Italia 2024, EuroPython 2024, and PyCon Austria 2025).
Please prepare a Python environment that you can use during the workshop. We will work in Jupyter Notebook. However, you can also use jupyter lab or one of the IDES, Visual Studio Code or PyCharm.
git clone https://github.com/janpipek/eda-polars-way.git
or using gh
client:
gh repo clone janpipek/eda-polars-way
Alternatively, you can just download the repo as a package from here:
https://github.com/janpipek/eda-polars-way/archive/refs/heads/main.zip
Python version 3.10+ is required.
First, cd
into the repository directory:
cd eda-polars-way
You do not have to install anything. Just run the appropriate uv run ...
commands.
The included requirements.txt
file should be enough for you to set up a Python environment
using the pip
command. First create the environment (just once):
python -m venv .venv
# Activate the environment (every time you open the shell),
# depending on your os
source .venv/bin/activate # <--- Linux, Mac
.venv\Scripts\activate.bat # <--- Windows
# Install the required packages
python -m pip install -r requirements.txt
You will have to repeat the activation step whenever you start a new command-line shell.
This is not recommended but working in case you have probelms installing on your laptop.
Create an account at https://deepnote.com (for free) and launch the repo by clicking the button:
Note that you will have to install additional packages (there is a command you need to uncomment).
All contents (a bit of text + all exercises) are located in exercises.ipynb
. The exercise are partly filled and accompanied by hints. If you are still unsure, in solutions.ipynb
, you have working code to answer the questions. To help SQL-savvy, the solutions-sql.ipynb
file contains solution using the SQL API of polars).
uv run jupyter notebook
or (if you installed via pip and activated your environment)
jupyter notebook
All the data sources are believed to be open and publicly distributable,
see data/README.md
for more details.
- Python Polars: A Lightning-Fast DataFrame Library @ RealPython
- R. Vink: What polars does for you, EuroPython 2023
- M. Harrison: Getting Started with Polars, Pycon US 2023