Menu

1 / 4

Pandas v Psycopg:

Better Programming - Medium·Thomas Reid·7 months ago
#wtVsxvjE
Reading 0:00
15s threshold

Image by Author

Member-only story

PandasPostgresPsycopg2PerformanceSpeed Test 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

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.