TypeError: Invalid returnType: returnType should be DataType or str but is <'pyspark.sql.types.IntegerType'>
@F.udf(returnType=IntegerType)
def func(x):
x+1
return x
df.withColumn('age', func(F.col('age'))
@F.udf(returnType=IntegerType)错了
应该是@F.udf(returnType=IntegerType())