Answers for "python site-packages pyspark"

0

python site-packages pyspark

import os

def myfun(x):`
        os.system("pip install shapely")
        return x
rdd = sc.parallelize([1,2,3,4]) ## assuming 4 worker nodes
rdd.map(lambda x: myfun(x)).collect() 
## call each cluster to run the code to import the library
Posted by: Guest on December-11-2020

Code answers related to "python site-packages pyspark"

Python Answers by Framework

Browse Popular Code Answers by Language