title: How to insert Pandas DataFrame into Cassandra?
body: <p>I have a dataframe as below:</p>
  
  <pre><code>df
  
  date        time       open   high   low   last
  01-01-2017  11:00:00   37      45     36    42
  01-01-2017  11:23:00   36      43     33    38
  01-01-2017  12:00:00   45      55     35    43
  
  ....
  </code></pre>
  
  <p>I want to write it into cassandra. It's kind of bulk upload after processing on data in python.</p>
  
  <p>The schema for cassandra is as below:</p>
  
  <pre><code>CREATE TABLE ks.table1(date text, time text, open float, high float, low 
                         float, last float, PRIMARY KEY(date, time))
  </code></pre>
  
  <p>To insert single row into cassandra we can use cassandra-driver in python but I couldn't find any details about uploading an entire dataframe.</p>
  
  <pre><code>from cassandra.cluster import Cluster
  
  session.execute(
      """
      INSERT INTO ks.table1 (date,time,open,high,low,last)
      VALUES (01-01-2017, 11:00:00, 37, 45, 36, 42)
      """)
  </code></pre>
  
  <p>P.S:  The similar <a href="https://stackoverflow.com/questions/46280412/insert-pandas-dataframe-into-cassandra-table">question</a> have been asked earlier, but doesn't have answer to my question. </p>