title: Creating a Spark DataFrame from a single string
body: <p>I'm trying to take a hardcoded String and turn it into a 1-row Spark DataFrame (with a single column of type <code>StringType</code>) such that:</p>
  
  <pre><code>String fizz = "buzz"
  </code></pre>
  
  <p>Would result with a DataFrame whose <code>.show()</code> method looks like:</p>
  
  <pre><code>+-----+
  | fizz|
  +-----+
  | buzz|
  +-----+
  </code></pre>
  
  <p>My best attempt thus far has been:</p>
  
  <pre><code>val rawData = List("fizz")
  val df = sqlContext.sparkContext.parallelize(Seq(rawData)).toDF()
  
  df.show()
  </code></pre>
  
  <p>But I get the following compiler error:</p>
  
  <pre><code>java.lang.ClassCastException: org.apache.spark.sql.types.ArrayType cannot be cast to org.apache.spark.sql.types.StructType
      at org.apache.spark.sql.SQLContext.createDataFrame(SQLContext.scala:413)
      at org.apache.spark.sql.SQLImplicits.rddToDataFrameHolder(SQLImplicits.scala:155)
  </code></pre>
  
  <p>Any ideas as to where I'm going awry? Also, how do I set <code>"buzz"</code> as the row value for the <code>fizz</code> column?</p>
  
  <hr>
  
  <h3>Update:</h3>
  
  <p>Trying:</p>
  
  <pre><code>sqlContext.sparkContext.parallelize(rawData).toDF()
  </code></pre>
  
  <p>I get a DF that looks like:</p>
  
  <pre><code>+----+
  |  _1|
  +----+
  |buzz|
  +----+
  </code></pre>