We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac87d2c commit 87156b1Copy full SHA for 87156b1
pandas/io/sql.py
@@ -2510,9 +2510,9 @@ def sql_schema(self) -> str:
2510
return str(";\n".join(self.table))
2511
2512
def _execute_create(self) -> None:
2513
- with self.pd_sql.run_transaction():
+ with self.pd_sql.run_transaction() as cur:
2514
for stmt in self.table:
2515
- self.pd_sql.execute(stmt).close()
+ cur.execute(stmt)
2516
2517
def insert_statement(self, *, num_rows: int) -> str:
2518
names = list(map(str, self.frame.columns))
0 commit comments