Github user BryanCutler commented on a diff in the pull request:
https://github.com/apache/spark/pull/18732#discussion_r141765529
--- Diff: python/pyspark/sql/functions.py ---
@@ -2206,6 +2207,10 @@ def pandas_udf(f=None, returnType=StringType()):
| 8| JOHN DOE| 22|
+----------+--------------+------------+
"""
+ import pandas as pd
+ if isinstance(returnType, pd.Series):
+ returnType = from_pandas_dtypes(returnType)
--- End diff --
Is this necessary?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]