Bulk update Postgres column from python dataframe
<p>I am using the below python code to update postgres DB column <code>value</code>based on <code>Id</code>. This loop has to run for thousands of records and it is taking longer time. </p>

<p>Is there a way where I can pass array of dataframe values instead of looping each row?</p>

<pre><code> for i in range(0,len(df)):
        QUERY=""" UPDATE "Table" SET "value"='%s' WHERE "Table"."id"='%s'
            """ % (df['value'][i], df['id'][i])
        cur.execute(QUERY)
        conn.commit()
</code></pre>