title: line contains NULL byte error in python csv reader
body: <p>I am trying to read each line of a csv file and get a "line contains NULL byte" error.</p>
  
  <pre><code>reader = csv.reader(open(mycsv, 'rU'))
  for line in reader:
       print(line)
  
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module
  _csv.Error: line contains NULL byte
  </code></pre>
  
  <p>Using the below I found that I have null bytes.</p>
  
  <pre><code>if '\0' in open(mycsv).read():
       print("have null byte")
  </code></pre>
  
  <p>What's the best way to work around this? Do a replace '\0' on all lines? I need to process this kind of file daily and have about 400,000 lines (1Gb) of data. I assume a replace would substantially slow this down even more.</p>