title: write csv rows one by one rather than all at once in python3 using writer.writerows(reader)
body: <p>I am saving a csv file after skipping the rows before the header:</p>
  
  <pre><code>                print (latest_file)
              with open(latest_file, "r",encoding="utf8") as infile:
                  reader = csv.reader(infile)
                  for row in reader:
                      #look for 
                      if row[0] == 'date/time':
                          print (row)
                          break
                  else:
                      print("{} not found".format('name'))
                  with open("C:/s3/"+str(p.from_date)+'_'+str(p.to_date)+'_'+str(merchant["country"])+'_'+str(merchant["company"])+'_'+"payments.csv", "w", newline='') as outfile:
                      writer = csv.writer(outfile)
                      writer.writerow(row) # headers
  </code></pre>
  
  <p>I am writing the remaining rows all at once to the file:</p>
  
  <pre><code>                    try:
                          writer.writerows(reader) # remaining rows
                      except Exception as e:
                          print (e)
  </code></pre>
  
  <p>I would like to write the rows once by one because windows throws the following error: <code>'charmap' codec can't encode character '\x83' in position 142: character maps to &lt;undefined&gt;</code></p>
  
  <p>It seems to be a windows issue, and since it happens so rarely, I would prefer to save the rows to the file one by one so only the problematic rows are skipped.</p>