After:
val df = Seq((1, Vector(2, 3, 4)), (1, Vector(2, 3, 4))).toDF(\"Col1\", \"Col2\")
I have this DataFrame in Apache Spark:
You can use a map:
df.map { case Row(col1: Int, col2: mutable.WrappedArray[Int]) => (col1, col2(0), col2(1), col2(2)) }.toDF("Col1", "Col2", "Col3", "Col4").show()