I have some difficulties finding out how to write the following code multi threaded. I guess its just a syntax thing how to write it probably.
What I want is to process every col
parallel, every col has their vfc
- array in the same data
object.
Thanks in advance
with multiprocessing.Pool() as pool:
for col in list_column_names:
# returns an array
vfc = self.get_vfc(col)
data[vfc] = data[col].apply(lambda x: self.smth(x, self.model))