2
val data = Array(-999.9,-0.5, -0.3, 0.0, 0.2, 999.9)
val dataFrame = sqlContext.createDataFrame(data.map(Tuple1.apply)).toDF("features")
我想在上面的数组中引入null条目。我在下面尝试,但它没有奏效。如何在火花scala中的数组中添加空值
val data = Array(-999.9,-0.5, -0.3, 0.0, 0.2, 999.9, null)
太谢谢你了。它工作 – user6200992
很酷。很高兴它有帮助。祝你好运! – Psidom