mengxr commented on issue #24997: [SPARK-28198][PYTHON] Add 
mapPartitionsInPandas to allow an iterator of DataFrames
URL: https://github.com/apache/spark/pull/24997#issuecomment-506815427
 
 
   @HyukjinKwon Does following code meet your requirements?
   
   ~~~python
   from pyspark.sql.functions import col, pandas_udf, PandasUDFType
   
   df = spark.createDataFrame([(1, 21), (2, 30)], ("id", "age"))
   
   @pandas_udf("boolean")
   def is_one(ids):
     return ids == 1
   
   df.filter(is_one(col("id"))).show()
   ~~~
   
   cc: @cloud-fan 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to