on Apache Spark I have a pandas_udf function that should return a pd.Series How can this be archived?
I tried:
@pandas_udf(ArrayType(LongType()), PandasUDFType.SCALAR_ITER) # Only works with spark 3.0
def udf(iterator):
...
return pd.Series([1,2,3,4,5])
this gives the exception:
pyarrow.lib.ArrowNotImplementedError: NumPyConverter doesn't implement <list<item: int64>> conversion.