Re: Convert Seq[Any] to Seq[String]

2020-12-19 Thread Roland Johann
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 wrote: >> >>> Hi, >>> >>> Can someone please help me how to convert Seq[Any] to Seq[String]

Re: Convert Seq[Any] to Seq[String]

2020-12-18 Thread Vikas Garg
ol > names to be > > On Fri, Dec 18, 2020 at 8:37 AM Vikas Garg 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. >

Re: Convert Seq[Any] to Seq[String]

2020-12-18 Thread Sean Owen
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 wrote: > Hi, > > Can someone please help me how to convert Seq[Any] to Seq[String] &g

Convert Seq[Any] to Seq[String]

2020-12-18 Thread Vikas Garg
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 = ListBuffe