title: Extract string from cell in Pandas dataframe
body: <p>I have a data frame, <code>df</code>:</p>
  
  <pre><code>         Filename         Weight
  0  '\file path\file.txt'    NaN
  1  '\file path\file.txt'    NaN
  2  '\file path\file.txt'    NaN
  </code></pre>
  
  <p>and I have an function where I input the file name and it extracts a float value for me from the file. What I want is to call the file path from <code>Filename</code> from each row in <code>df</code> into my function and then output the data into the <code>Weight</code> column. My current code is:</p>
  
  <pre><code>df['Weight'] = df['Weight'].apply(x_wgt_pct(df['filename'].to_string()), axis = 1)
  </code></pre>
  
  <p>My error is:</p>
  
  <pre><code>pandas\parser.pyx in pandas.parser.TextReader.__cinit__ (pandas\parser.c:3173)()
  
  pandas\parser.pyx in pandas.parser.TextReader._setup_parser_source (pandas\parser.c:5912)()
  
  IOError: File 0      file0.txt
  1      file1.txt
  2      file2.txt
  3      file3.txt does not exist
  </code></pre>
  
  <p>Not sure whether this error is bc it is calling all the file paths simultaneously as a string or I did not input the file path correctly. </p>