Github user icexelloss commented on a diff in the pull request:
https://github.com/apache/spark/pull/19630#discussion_r148811820
--- Diff: python/pyspark/sql/group.py ---
@@ -214,11 +214,11 @@ 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(returnType=df.schema,
functionType=PandasUdfType.GROUP_FLATMAP)
--- End diff --
I am not tied to the current naming. Let me think a bit more on this.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]