Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/19630#discussion_r151399050
--- Diff: python/pyspark/sql/group.py ---
@@ -214,15 +214,15 @@ def apply(self, udf):
:param udf: A function object returned by
:meth:`pyspark.sql.functions.pandas_udf`
- >>> from pyspark.sql.functions import pandas_udf
+ >>> from pyspark.sql.functions import pandas_udf, PandasUDFType
>>> df = spark.createDataFrame(
... [(1, 1.0), (1, 2.0), (2, 3.0), (2, 5.0), (2, 10.0)],
... ("id", "v"))
- >>> @pandas_udf(returnType=df.schema)
+ >>> @pandas_udf("id long, v double", PandasUDFType.GROUP_MAP)
--- End diff --
Yup .. it should be something for a followup anyway even it is somehow
possible ..
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]