You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "holdenk (JIRA)" <ji...@apache.org> on 2018/08/13 17:51:00 UTC

[jira] [Created] (SPARK-25105) Importing all of pyspark.sql.functions should bring PandasUDFType in as well

holdenk created SPARK-25105:
-------------------------------

             Summary: Importing all of pyspark.sql.functions should bring PandasUDFType in as well
                 Key: SPARK-25105
                 URL: https://issues.apache.org/jira/browse/SPARK-25105
             Project: Spark
          Issue Type: Improvement
          Components: PySpark
    Affects Versions: 2.4.0
            Reporter: holdenk


 
{code:java}
>>> foo = pandas_udf(lambda x: x, 'v int', PandasUDFType.GROUPED_MAP)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
NameError: name 'PandasUDFType' is not defined
 
{code}
When explicitly imported it works fine:
{code:java}
 
>>> from pyspark.sql.functions import PandasUDFType
>>> foo = pandas_udf(lambda x: x, 'v int', PandasUDFType.GROUPED_MAP)
{code}
 

We just need to make sure it's included in __all__/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org