Companion material for the O'Reilly live course
In this repository, you will find all live demos for the course.
Although duckdb can work independently of Python, this course
uses Jupyter notebooks. All statements (except for the paths
refering to the data) can also run in duckdb-cli.
The notebooks have a few advantages though:
- Displaying results as a `DataFrame´ is prettier.
- The notebooks work with a local installation (see
pyproject.toml) and with Google Colab (no further installation necessary). - Downloading the necessary data is included in the notebooks.
- For demonstrating the interoperability of Python and
duckdb, notebooks would be necessary anyway.
If you use a local installation, clone the repository,
install the necessary packages (uv sync if using uv,
otherwise create a venv and pip install -r requirements.txt).
Register the kernel with either uv run python -m ipykernel install --user --name duckdb --display-name "duckdb" or python -m ipykernel install --user --name duckdb --display-name "duckdb".
If you want to work with Google Colab, you can directly open the links to the notebooks below.