Apache spark 将整行作为附加参数传递给PySpark中的UDF
为了将整行作为附加参数传递给Scala中的Spark UDF,我使用Apache spark 将整行作为附加参数传递给PySpark中的UDF,apache-spark,pyspark,apache-spark-sql,Apache Spark,Pyspark,Apache Spark Sql,为了将整行作为附加参数传递给Scala中的Spark UDF,我使用struct(“*”),例如: df.select(myUDF($"name",struct("*"))) 如何在PySpark中执行相同的操作?其中一种方法是 df.select(myUDF(f.struct(*list(df.columns))))
struct(“*”)
,例如:
df.select(myUDF($"name",struct("*")))
如何在PySpark中执行相同的操作?其中一种方法是
df.select(myUDF(f.struct(*list(df.columns))))