Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

multiprocessing while applying a function in pandas

from pandarallel import pandarallel
from math import sin

pandarallel.initialize()

def func(x):
    return sin(x**2)

df.parallel_apply(func, axis=1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #multiprocessing #applying #function #pandas
ADD COMMENT
Topic
Name
2+8 =