1

I wrote multitprocessing program in python. For each process my program returns a dataframe. At the end I want to concatenate those dataframes into one dataframe. How can I do it?

Code example:

def main():
    with Pool() as pool:
        result_df = pool.starmap(search, zip(a, b))

if __name__ == '__main__':    
    # freeze_support()
    main()
martineau
  • 119,623
  • 25
  • 170
  • 301
Cavidan
  • 23
  • 7
  • does this answer to your question? https://stackoverflow.com/questions/44621116/combine-dataframes-returned-from-python-multiprocess-calling-function – dhananjay sawarkar Aug 05 '21 at 07:06

1 Answers1

0

Just use concat()

df = pd.concat(result_df)

alec_djinn
  • 10,104
  • 8
  • 46
  • 71