title: Issues getting Python Multiprocessing Library Working when using the Process Function
body: <p>I'm trying to build a list of parent/comment pairs from the publicly available Reddit data set.</p>
  
  <p>I have a CSV file which I load into a Pandas dataframe which contains rows of the comments with the parent and child id, as well as the child comment. The data is loaded using the following block of code:</p>
  
  <pre><code>import os
  import multiprocessing as mp
  import numpy as np 
  import pandas as pd
  
  sourcePATH = r'C:\'
  workingFILE = r'\output-pt1.csv'
  
  # filepaths
  
  input_file = sourcePATH + workingFILE
  
  data_df = pd.read_csv(input_file,header=None,names=['PostIDX','ParentIDX','Comment','Score','Controversiality'])
  </code></pre>
  
  <p>The aim is to scan through each row in the dataframe and using the parent id to search through the rest of the dataframe to see if their is a parent comment present. If it is I then store the child and parent comments in a tuple with some other information. This will then be added to a list which will then be written out to a csv file at the end. To do this I use the following code:</p>
  
  <pre><code>def checkChildParent(ParentIDX_curr, ChildIDX_curr,ChildComment_curr,ChildScore_curr,ChildCont_curr):
  
      idx = data_df.loc[data_df['PostIDX'] == ParentIDX_curr]
  
      if idx.empty is False:
          ParentComment = idx.iloc[0,2]
          ParentScore = idx.iloc[0,3]
          ParentCont = idx.iloc[0,4]
          outPut.put([ParentIDX_curr[0], ParentComment,ParentScore,ParentCont,ChildIDX_curr[0], ChildComment_curr[0],ChildScore_curr[0],ChildCont_curr[0]])
  
  
  if __name__ == '__main__':
      print('Process started')
      t_start_init = time.time()
      t_start = time.time()
  
      noCores = 1
  
      #pool = mp.Pool(processes=noCores)
  
      update_freq = 100
      n = 1000
      #n = round(len(data_df)/8)
      flag_create = 0
      flag_run = 0
      i = 0
      outPut = mp.Queue()
  
      #parent_child_df = pd.DataFrame()
      #parent_child_df.coumns = ['PostIDX','ParentIDX']
  
  
      while i &lt; n:
          #print(i)
          procs = []
          ParentIDX = []
          ParentComment = []
          ParentScore = []
          ParentCont = []
          ChildIDX = []
          ChildComment = []
          ChildScore = []
          ChildCont = []
  
          for worker in range(0,noCores):
              ParentIDX.append(data_df.iloc[i,1])
              ChildIDX.append(data_df.iloc[i,0])
              ChildComment.append(data_df.iloc[i,2])
              ChildScore.append(data_df.iloc[i,3])
              ChildCont.append(data_df.iloc[i,4])
              i = i + 1
  
          #when I call the function this way it returns the expected matches
          #checkChildParent(ParentIDX,ChildIDX,ChildComment,
          #      ChildScore,ChildCont)
  
  
          #when I call the function with Process function nothing appears to be happening
          for proc in range(0,noCores):
              p = mp.Process(target = checkChildParent, args=(ParentIDX[proc],ChildIDX[proc],ChildComment[proc],ChildScore[proc],ChildCont[proc]))
              procs.append(p)
              p.start()
  
          #for p in procs:
          #    p.join()
  
          if outPut.empty() is False:
              print(outPut.get())
  </code></pre>
  
  <p>At the top of the file is a function which scans the dataframe for a given row and returns the tuple of the matched parent and child comment if it was found. If I call this function normally then it works fine, however when I call the function using the Process function it doesn't match anything!. I'm guessing its the form the arguments that are being passed to the function is being passed to the function that is causing the issue, but I have been trying to debug this all afternoon and have failed so far. If anyone has any suggestions then please let me know!</p>
  
  <p>Thanks!</p>