I am using python 2.7 with pyspark,
I use a user defined function and it works well when i use it like this
def func(x):
pass
RDD.map(lambda x:func(x))
but when I create the function inside another script called utils and use
from utils import func as func
RDD.map(lambda x:func(x))
I get an error
ImportError: No module named utils
how can i import a function from a user defined module and use it with RDD map?
Thanks