def run(): df=Pool(len(S)).map(runForS,S) df=pd.concat(df) df.to_pickle('/home/arya/out/{}/{}.df'.format(ModelName,method))