1import multiprocessing as mp
2pool = mp.Pool(processes=mp.cpu_count())
3
4def func( arg ):
5 idx,row = arg
6 # Edit df
7 return row
8
9new_rows = pool.map( func, [(idx,row) for idx,row in data_all.iterrows()])
10data_all_new = pd.concat( new_rows )
11