title: SPARK SQL : How to convert List[List[Any]) to Data Frame
body: <pre><code>val list = List(List(1,"Ankita"),List(2,"Kunal"))
  </code></pre>
  
  <p>and now I want to convert it into the data frame -</p>
  
  <pre><code> val list = List(List(1,"Ankita"),List(2,"Kunal")).toDF("id","name")
  </code></pre>
  
  <p>but it throws an error - </p>
  
  <p>java.lang.ClassNotFoundException: Scala.any</p>