title: Trying to create dataframe with two columns [Seq(), String] - Spark
body: <p>When I run the following on the spark-shell, I get a dataframe:</p>
  
  <pre><code>scala&gt; val df = Seq(Array(1,2)).toDF("a")
  
  scala&gt; df.show(false)
  +------+
  |a     |
  +------+
  |[1, 2]|
  +------+
  </code></pre>
  
  <p>But when I run the following to create a dataframe with two columns:</p>
  
  <pre><code>scala&gt; val df1 = Seq(Seq(Array(1,2)),"jf").toDF("a","b")
  &lt;console&gt;:23: error: value toDF is not a member of Seq[Object]
      val df1 = Seq(Seq(Array(1,2)),"jf").toDF("a","b")
  </code></pre>
  
  <p>I get the error: </p>
  
  <blockquote>
    <p>Value toDF is not a member of Seq[Object]. </p>
  </blockquote>
  
  <p>How do I go about this? Is toDF only supported for sequences with primitive datatypes?  </p>