I am using Spark, Scala to process data. I have one question couldn't figure out. I have a dataframe, which is one column:
This is happening because when you
collect a dataframe you get an Array of rows. You need to extract the values from the row objects.
df.collect().map(x => x.getDouble(0)).toVector