agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Adrian Klaver <adrian.klaver@aklaver.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres
Date: Mon, 4 Oct 2021 09:06:40 -0700
Message-ID: <a6105435-6bfd-8776-fe38-13ffab752f23@aklaver.com> (raw)
In-Reply-To: <CA+i5JwY1jDx3jyBCkuJQhOyPELAoYVFtOmCqgxotTXmGc3wO9g@mail.gmail.com>
References: <CA+i5JwYnUBCKSnWn96OvtF66oGYHNGefMd5V_Bgceu=4PtcDNw@mail.gmail.com>
<CA+i5JwY1jDx3jyBCkuJQhOyPELAoYVFtOmCqgxotTXmGc3wO9g@mail.gmail.com>
On 10/4/21 8:44 AM, Shaozhong SHI wrote:
>
> Has anyone tested this one?
> A Fast Method to Bulk Insert a Pandas DataFrame into Postgres · Ellis
> Valentiner
> <https://ellisvalentiner.com/post/a-fast-method-to-insert-a-pandas-dataframe-into-postgres/;
>
> 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?
method is a legitimate keyword:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html?highlight=to_sql#pandas.Da...
So there must be something about how you used it.
Pandas version?
The actual code you used when the error occurred?
>
>
> Regards,
>
>
> David
>
--
Adrian Klaver
adrian.klaver@aklaver.com
view thread (12+ messages) latest in thread
Message-ID: <a6105435-6bfd-8776-fe38-13ffab752f23@aklaver.com>
Permalink: ../a6105435-6bfd-8776-fe38-13ffab752f23@aklaver.com/
Also on: postgresql.org/message-id/a6105435-6bfd-8776-fe38-13ffab752f23@aklaver.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: adrian.klaver@aklaver.com, shishaozhong@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres
In-Reply-To: <a6105435-6bfd-8776-fe38-13ffab752f23@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox