https://docs.pola.rs/api/python/stable/reference/sql/python_...
https://docs.pola.rs/api/python/stable/reference/sql/python_...
To be fair, it can nearly always be done in SQL also (unless it’s ML or some Python-specific thing like that), but the SQL with nested queries and numerous CTEs is harder for me to wrap my brain around.
If I were betting, I’d pick DuckDB, because DuckDB seems more able to implement something Polars-like, than Polars is to implement something DuckDB-like.
I use DuckDB and I typically write correct SQL, but having LSP assistance would greatly enhance my quality of life.
https://duckdb.org/docs/api/python/spark_api
And while on the subject of syntax, duckdb also has function chaining
https://duckdb.org/docs/sql/functions/overview.html#function...