7
我收到以下错误试图建立一个ML Pipeline
:如何将ArrayType转换为PySpark DataFrame中的DenseVector?
pyspark.sql.utils.IllegalArgumentException: 'requirement failed: Column features must be of type [email protected] but was actually ArrayType(DoubleType,true).'
我features
列包含浮点值的数组。这听起来像我需要将这些转换为某种类型的矢量(它不稀疏,所以DenseVector?)。有没有办法直接在DataFrame上执行此操作,还是需要将其转换为RDD?