News for hackers. Stuff that matters.
Re:DuckDB – in-process SQL OLAP database management system by 89vision on Friday February 10, 2023 @04:49PM (#34746404)
> working with SQL is nicer than Pandas

Really? I prefer working with dataframe apis. You get a nice sql-like paradigm plus all the control structures of the runtime.

Re:DuckDB – in-process SQL OLAP database management system by wenc on Friday February 10, 2023 @06:19PM (#34747384)
SQL is much nicer for anything non-trivial. Pandas methods get unwieldy for complex aggregations.

Also Pandas methods are imperative so cannot be optimized. SQL is declarative so it can be optimized to the hilt and DuckDB is faster than Pandas in almost all cases, even on Pandas data frames themselves! (partly due to vectorization).

Re:DuckDB – in-process SQL OLAP database management system by camgunz on Friday February 10, 2023 @07:58PM (#34748306)
Databases are just much, much faster than Pandas, and that's before you start factoring the extraction and loading of data. I treat Pandas as a last resort when I can't do something in SQL, generally this is something like integrating with external services or running recordlinkage.
Re:DuckDB – in-process SQL OLAP database management system by RobinL on Saturday February 11, 2023 @02:26AM (#34750340)
If you're curious, I've written a FOSS record linkage library that executes everything as SQL. It supports multiple SQL backends including DuckDB and Spark for scale, and runs faster than most competitors because it's able to leverage the speed of these backends: https://github.com/moj-analytical-services/splink
Re:DuckDB – in-process SQL OLAP database management system by camgunz on Saturday February 11, 2023 @05:02AM (#34750976)
Oh hot tip! Thank you! Love the blog btw
Re:DuckDB – in-process SQL OLAP database management system by jammycrisp on Friday February 10, 2023 @11:17PM (#34749526)
You might be interested in checking out Ibis (https://ibis-project.org/). It provides a dataframe-like API, abstracting over many common execution engines (duckdb, postgres, bigquery, spark, ...). Ibis wrapping duckdb has pretty much replaced pandas as my tool of choice for local data analysis. All the performance of duckdb with all the ergonomics of a dataframe API. (disclaimer: I contribute to Ibis for work).
Re:DuckDB – in-process SQL OLAP database management system by je42 on Saturday February 11, 2023 @02:44AM (#34750435)
Interesting ! One newbie question, how does ibis differ from sqlalchemy ?
Re:DuckDB – in-process SQL OLAP database management system by 89vision on Monday February 13, 2023 @01:29PM (#34777906)
sql alchemy is an orm, where ibis looks to be a dataframe api that is sort of a dsl over sql. It doesn't try to map relational domains to an object oriented paradigm like sql alchemy does