0

enter image description here

Not able to extract the third element from the column features:

rescaledData.withColumn("test", rescaledData["features"].getItem(2))
rescaledData.selectExpr("features[2]").show()

Both don't work

lo1gur
  • 160
  • 2
  • 15
  • 1
    Possible duplicate of [How to split Vector into columns - using PySpark](https://stackoverflow.com/questions/38384347/how-to-split-vector-into-columns-using-pyspark) – 10465355 Feb 28 '19 at 10:25
  • That's not list, that's ML or MLlib vector. – 10465355 Feb 28 '19 at 10:26

0 Answers0