Im using Spark 2.0. I have a column in my frame containing WrappedArrayWrappedArrays of Float.
Example line:
[[1.0 2.0 2.0][6.0 5.0 2.0][4.0 2.0 3.0]]
I am trying to convert this column to . Array[Array[Float]]
I have tried so far the following:
dataframe.select("mycolumn").rdd.map(r => r.asInstanceOf[Array[Array[Float]]])
but I get the following error:
Caused by: java.lang.ClassCastException:
org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema cannot be cast to [[F
Any idea would be greatly appreciated. Thanks
source
share