Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2015 08:50 AM
For a bit more detail, this sort of worked:
val dfExploded = df.explode(df("price")) { case Row(pr: WrappedArray[String]) => pr.map(pr => Price(pr(0).toString, pr(1).toString) ) }
dfExploded.show()
(I had to use "WrappedArray" instead of "Array" to get past the exceptions)
but the output had some problems (char limits in this forum are forcing be to be terse)