It's not really a Spark question. .toDF() takes column names. atrb.head.toSeq.map(_.toString)? but it's not clear what you mean the col names to be
On Fri, Dec 18, 2020 at 8:37 AM Vikas Garg <sperry...@gmail.com> wrote: > Hi, > > Can someone please help me how to convert Seq[Any] to Seq[String] > > For line > val df = row.toSeq.toDF(newCol.toSeq: _*) > I get that error message. > > I converted Map "val aMap = Map("admit" -> ("description","comments"))" > to Seq > > var atrb = ListBuffer[(String,String,String)]() > > for((key,value) <- aMap){ > atrb += ((key, value._1, value._2)) > } > > var newCol = atrb.head.productIterator.toList.toSeq > > Please someone help me on this. > > Thanks > >