import multiprocessing

def worker(arg):
    return arg * 2
pool = multiprocessing.Pool()
res = pool.map(worker, [1, 2, 3])
pool.close()
pool.join()
output = sum(res)
print('got:', output)
Python Pandas Multiprocessing Apply