报错的信息是:expected zero arguments for construction of ClassDict (for numpy.dtype)

原因:spark的udf中,返回值是numpy的数据类型。

解决办法:用Python的类型包裹一下,比如:本来的返回值是return xx, 改成 return float(xx)

更多推荐

spark expected zero arguments for construction of ClassDict (for numpy.dtype)