Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres - Mailing list pgsql-sql

From Steve Midgley
Subject Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres
Date
Msg-id CAJexoSL6kOb1uhoxoqp6jpMq0+u0DVajuYbYiAZiB6YAMrLuZA@mail.gmail.com
Whole thread Raw
In response to Testing of a fast method to bulk insert a Pandas DataFrame into Postgres  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres
List pgsql-sql


On Mon, Oct 4, 2021 at 8:55 AM Shaozhong SHI <shishaozhong@gmail.com> wrote:
Has anyone tested this one?

I tried psql_insert_copy method, but I got the following error message.

to_sql() got an unexpected keyword argument 'method'

Can anyone shed light on this?

Interesting - I wasn't aware there was a faster method than "COPY ... FROM ... CSV" 

Maybe my best input is that I've always found COPY/FROM/CSV to be insanely fast and really easy to write from any standard console or ORM, so maybe the fractional performance increase from other methods isn't worth it, given how performant, reliable and easy to use this approach is? Not really an answer but food for thought..

Steve

pgsql-sql by date:

Previous
From: Shaozhong SHI
Date:
Subject: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres
Next
From: Steve Midgley
Date:
Subject: Re: How to set up temporary path for starting up psql in any folder?