Skip to content

Instantly share code, notes, and snippets.

@timothyrenner
Created January 30, 2019 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timothyrenner/5ea08753a14516d4cc4c2f16adce295d to your computer and use it in GitHub Desktop.
Save timothyrenner/5ea08753a14516d4cc4c2f16adce295d to your computer and use it in GitHub Desktop.
Pyspark UDF Creation
from pyspark.sql.functions import udf
from pyspark.sql.types import DoubleType
predict_udf = udf(predict, DoubleType())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment