title: Pandas data frame where each row is a list where blank space needs to be replaced with a comma
body: <p>I have a pandas data frame read from a <strong>.csv</strong> file where the output is something like this:</p>
  
  <pre><code>1     [44 48 50 55 56 57]
  2     [49 54 57 61 62 64]
  3     [45 51 53 58 59 61]
  4     [47 52 54 59 60 62]
  </code></pre>
  
  <p>Each row is to be the list for a separate for loop.</p>
  
  <p>I need each value in the lists to be delimited with a comma.</p>
  
  <p>I've tried using <strong>df.replace (' ', ',')</strong>, this returns the same lists.</p>
  
  <p>Below is the code I'm using to produce the data frame:</p>
  
  <pre><code>dfm2 = pd.read_csv ('/Users/uni/Desktop/corrindex+id/res_rt512_58_60_71_76_79_81.txt', sep = ',', delimiter = ',', usecols = [18], index_col = False, header=None)
  
  print dfm2
  </code></pre>
  
  <p>Any insight on how to get each list delimited by a comma would be appreciated.</p>