PostgreSQL
 SQL >> Database >  >> RDS >> PostgreSQL

Risolvere l'errore “unexpected keyword argument 'fetch'” in pandas to_sql

Il problema può essere una incompatibilità tra sqlalchemy e psycopg2. Il parametro fetch è stato aggiunto in psycopg2 2.8.

Una soluzione temporanea è aggiungere method='multi', ma la correzione definitiva è aggiornare psycopg2:

pip install psycopg2-binary==2.8.6