admin管理员组

文章数量:1794759

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

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

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

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

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

本文标签: argumentsexpectedsparkConstructiondtype