I am unpickling an object and passing as one of the args for process.Getting no output.
I want to know if this method of unpickling and passing an object as argument is causing any error for multiprocessing. What will be work around for this?
from multiprocessing import Process, Queue
def func(arg1, arg2,q):
df_temp = arg1[arg1['col'].isin(arg2)]
q.put(df_temp)
if __name__ == '__main__':
import pickle
import pandas as pd
arg1= pickle.load(open('paths.p','rb'))
arg2= pd.Series(pd.date_range(end = 'some_Date', periods=12,freq = 'MS')).dt.to_pydatetime()
arg2=[i.date() for i in arg2]
q = Queue()
p =Process(target=func, args=(arg1,arg2,q))
p.start()
p.join()
while not q.empty():
w=q.get()