Calling a python function (def) in databricks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2022 12:53 PM
Not sure if I'm missing something here, but running a task outside of a python function runs much much quicker than executing the same task inside a function. Is there something I'm missing with how spark handles functions?
1)
def task(x):
y = dostuff(x)
return y
2)
y = dostuff(x)
Labels:
- Labels:
-
Pyspark
-
Python
-
Python Function