Summary
In this chapter, we went on a deep dive through the DuckDB Python client. We started with the Relational API, illustrating its affinity for analytical workflows by using it to explore the Seattle pet licenses dataset. We then took the DB-API through its paces, illustrating some of the operations that you can use to build data applications and integrations. We then finished the chapter with a look at a range of Python integrations that DuckDB offers, including working with other data structures, converting results into other formats, type conversion between Python and DuckDB, creating UDFs, and lastly, handling exceptions raised by DuckDB. Do note that this chapter and the previous one are not intended to be an exhaustive guide to the DuckDB Python API. For that, you should consult the documentation for the DuckDB Python API: https://duckdb.org/docs/api/python.
You now have the ingredients you need to bring DuckDB into your Python data analysis workflows or to start building...