title: Replace multiple cell in csv python module
body: <p>I've a large csv file(comma delimited). I would like to replace/rename few random cell with the value "NIL" to an empty string "". </p>
  
  <p>I tried this to find the keyword <code>"NIL"</code> and replace with <code>''</code> empty
  string. But it's giving me an empty csv file</p>
  
  <pre class="lang-py prettyprint-override"><code>ifile = open('outfile', 'rb') 
  reader = csv.reader(ifile,delimiter='\t') 
  ofile = open('pp', 'wb') 
  writer = csv.writer(ofile, delimiter='\t') 
  findlist = ['NIL'] 
  replacelist = [' '] 
  s = ifile.read() 
  for item, replacement in zip(findlist, replacelist): 
      s = s.replace(item, replacement) 
  ofile.write(s)
  </code></pre>