title: Replace white space in .csv for specific column, Python
body: <p>I have a seemingly simple task with a .CSV file. I need to replace all white space with 0's for two specific columns (37, 38). I've tried the following code:</p>
  
  <pre><code>import csv
  
  with open("C:/Temp/whiteSpace.csv", "rb") as infile, open("C:/Temp/repaired_test.csv", "wb") as outfile:
      reader = csv.reader(infile)
      writer = csv.writer(outfile)
      for row in reader:
          row[37] = row[37].replace(' ', '0')
          writer.writerow(row)
          print row[37]
  </code></pre>
  
  <p>However, this simply writes the "whiteSpace.csv" over to "repaired_test.csv" with out editing anything. </p>
  
  <p>I've found plenty on stripping whitespace (<a href="https://stackoverflow.com/questions/14885908/strip-white-spaces-from-file-csv">strip white spaces from file csv</a>) but I'm not able to connect the dots and make my code work.</p>
  
  <p>Sorry for the redundant question, and thank you in advance. </p>