[Tutor] Bulk update to a SQL Server table
ram
ramprasad.kolla at gmail.com
Sun Jan 6 21:15:27 EST 2019
Hi All,
I have 7000+ records in a SQL Server table with 3 columns, which uniquely
identify each record (I didn't define them as composite primary key).
I load these 7000+ records into a Pandas DataFrame and update a subset of
these records.
What's the optimal way to update this subset of records to SQL table?
I'm hesitant to using DataFrame.to_sql(...., if_exists="replace") as it
removes unchanged records too and adds them alongwith the updated ones.
Please advise.
Thank you!
Venkat Kolla
More information about the Tutor
mailing list