PostHole
Compose Login
You are browsing eu.zone1 in read-only mode. Log in to participate.
rss-bridge 2023-11-10T17:34:53+00:00

Pandas v Psycopg:

A Postgres database speed test. Who wins?Continue reading on Better Programming »


[Two racing cars in a race, one represents Pandas, the other Psycopg2]

Image by Author

Member-only story

Pandas v Psycopg

Thomas Reid

7 min readAug 10, 2023

A Postgres database speed test. Who wins?

Following on from a story I wrote comparing the speed of Pandas and Polars libraries in terms of reading and writing data — from and to — a Postgres database I thought it might be interesting to do a similar comparison between Pandas and Psycopg2.

If you need to get data from or to a Postgres database table from or to a local file, read on for the winner.

You can find the Pandas v Polars article at the link below:

Pandas v Polars: A database speed test. Who wins?

We have a process that runs against our AWS RDS Postgres database. It’s based on a Python Jupyter Notebook and reads a…

levelup.gitconnected.com

Pandas

I don’t think I need to explain much about what Pandas is. Its use in Python code is ubiquitous and is one of the main tools that people use to load, explore, visualise and process large amounts of data in Python.

Psycopg

Psycopg is one of the most popular PostgreSQL database libraries for the Python programming language. It implements the Python Database API Specification v2.0, allowing Python applications to communicate with PostgreSQL databases.


*Original source*

Reply