Does the Pandas DataFrame.to_sql() function require a subsequent commit()?
问题 The documentation for the Pandas function to_sql() available for DataFrame objects (see to_sql() documentation) does not state that a commit() call on the connection is needed (or recommended) to persist the update. Can I safely assume that DataFrame.to_sql('table_name', con) will always automatically commit the changes (like in: con.commit() )? 回答1: Yes, at the end of the day it will be commited automatically. Pandas calls SQLAlchemy method executemany (for SQL Alchemy connections): conn