Skip to content

Commit

Permalink
enable multivalues insert
Browse files Browse the repository at this point in the history
  • Loading branch information
danfrankj committed Feb 12, 2018
1 parent 569bc7a commit 06fcfcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def insert_data(self):

def _execute_insert(self, conn, keys, data_iter):
data = [{k: v for k, v in zip(keys, row)} for row in data_iter]
conn.execute(self.insert_statement(), data)
conn.execute(self.insert_statement().values(data))

def insert(self, chunksize=None):
keys, data_list = self.insert_data()
Expand Down Expand Up @@ -1267,7 +1267,7 @@ def insert_statement(self):

def _execute_insert(self, conn, keys, data_iter):
data_list = list(data_iter)
conn.executemany(self.insert_statement(), data_list)
conn.executemany(self.insert_statement().values(data_list))

def _create_table_setup(self):
"""
Expand Down

0 comments on commit 06fcfcc

Please sign in to comment.