title: Invalid STRING constant error in Apache Cassandra (using Python)
body: <p>I'm new to Apache Cassandra (using Python 3) and I'm trying to create a table based on a csv file. Here's how the file looks like this one:
  <a href="https://i.stack.imgur.com/aYRS1.jpg" rel="noreferrer">https://i.stack.imgur.com/aYRS1.jpg</a> (sorry but I don't have enough reputation points to post the image here)</p>
  
  <p>First I create the table</p>
  
  <pre><code>query1 = "CREATE TABLE IF NOT EXISTS table1(artist text, title text, \
              length text, sessionId text, itemInSession text, PRIMARY KEY (sessionId, title, artist))"     
  
  session.execute(query1)
  </code></pre>
  
  <p>And then I try to read the file and insert the desired data into the table:</p>
  
  <pre><code>file = 'event_datafile_new.csv'
  
  with open(file, encoding = 'utf8') as f:
      csvreader = csv.reader(f)
      next(csvreader) # skip header
      for line in csvreader:
          query = "INSERT INTO table1(artist, title, length, sessionId, itemInSession)"
          query = query + "VALUES(%s, %s, %s, %s, %s)"
          session.execute(query, (line[0], line[9], line[5], line[8], line[3]))
  </code></pre>
  
  <p>However, I get the follow error:</p>
  
  <pre><code>---&gt; 13         session.execute(query, (line[0], line[9], line[5], line[8], line[3]))
  
  /opt/conda/lib/python3.6/site-packages/cassandra/cluster.cpython-36m-x86_64-linux-gnu.so in cassandra.cluster.Session.execute (cassandra/cluster.c:38536)()
  
  /opt/conda/lib/python3.6/site-packages/cassandra/cluster.cpython-36m-x86_64-linux-gnu.so in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:80834)()
  
  InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid STRING constant (288.9922) for "length" of type float"
  </code></pre>
  
  <p>Even when I tried changing the format of "length" to float - and %s to %f on the INSERT statement - it didn't workout. Does anyone know what might be the issue? Many thanks! :)</p>