
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)
👁️ 阅读量:0
© 版权声明:本文《spark expected zero arguments for construction of ClassDict (for numpy.dtype)》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686510400a275100.html。