title: How to read a CSV to pandas and get the value of one cell
body: <p>I have a CSV file and I want to:
  1. Import the CSV as a Dataframe 
  2. Read in a row at a time
  3. Copy the VALUES of each cell to a separate string
  4. Print the strings
  5. Go to the next row and repeat steps 3-4 until done.</p>
  
  <p>My code kind of works, it does read in and prints the first 2 rows, but there are 6 in my CSVC file.</p>
  
  <p>I tried adding an index field but that didn't help much, 3 lines printed instead of 6.</p>
  
  <p>Here is what my CSV file looks like: (the extra line return is so you can read it, not shown in my file.</p>
  
  <p>00C525B70C246049E4.dwg,011021a.dwg</p>
  
  <p>00CD5B2301DF204DCC.dwg,010636e.dwg</p>
  
  <p>00F70B6C0B1EF04B54.dwg,005159v.dwg</p>
  
  <p>0A02B9F7087BF040D5.dwg,003552n.dwg</p>
  
  <p>0A1EE7CC078B404C64.dwg,020526c.dwg</p>
  
  <p>0A1F67D201CCD04F81.doc,X1771-a.doc</p>
  
  <pre><code>import pandas
  
  colnames = ['infocard','file_name']
  data = pandas.read_csv('E:/test_Files_To_Rename.csv', names=colnames)
  
  for i, elem in enumerate(data,0):
  
          sfile = data.loc[i,"infocard"]
          dst = data.loc[i,"file_name"]
       print( sfile +' to ' + dst )
  </code></pre>
  
  <p>Once I get the program to print the two different file names I want to replace the print statement with:</p>
  
  <p>os.rename(sfile, dst)</p>
  
  <p>so I can rename the files. I am testing with 6 files, my database has 50,000 files which is why I want to use a script.</p>
  
  <p>This is what is displayed:</p>
  
  <p>00C525B70C246049E4.dwg to 011021a.dwg</p>
  
  <p>00CD5B2301DF204DCC.dwg to 010636e.dwg</p>
  
  <p>Any ideas?
  Thanks!</p>