title: how to transform pandas dataframe for insertion via executemany() statement?
body: <p>I have a fairly big pandas <code>dataframe - 50</code> or so headers and a few hundred thousand rows of data - and I'm looking to transfer this data to a database using the <code>ceODBC</code> module. Previously I was using <code>pyodbc</code> and using a simple execute statement in a for loop but this was taking ridiculously long (1000 records per 10 minutes)... </p>
  
  <p>I'm now trying a new module and am trying to introduce <code>executemany()</code> although I'm not quite sure what's meant by sequence of parameters in:</p>
  
  <pre><code>    cursor.executemany("""insert into table.name(a, b, c, d, e, f) 
  values(?, ?, ?, ?, ?), sequence_of_parameters)
  </code></pre>
  
  <p>should it look like a constant list working through each header like</p>
  
  <pre><code>    ['asdas', '1', '2014-12-01', 'true', 'asdasd', 'asdas', '2', 
  '2014-12-02', 'true', 'asfasd', 'asdfs', '3', '2014-12-03', 'false', 'asdasd']
  </code></pre>
  
  <ul>
  <li>where this is an example of three rows</li>
  </ul>
  
  <p>or what is the format that's needed?</p>
  
  <p>as another related question, how then can I go about converting a regular pandas dataframe to this format?</p>
  
  <p>Thanks!</p>