title: remove u letters from the csv in python 2.7
body: <p>I already searched the solutions online, but it did not work on the following python script. I am getting u letter in csv file.</p>
  
  <pre><code>import sys
  reload(sys)
  sys.setdefaultencoding('utf-8')
  import codecs
  import csv
  cursor = db.jobs.find( {}, {'_id':1,  'locationIds':1,  'termMap.en':1  })
  with codecs.open('job_test.csv', 'w', encoding='utf-8') as outfile:
      fields = ['_id', 'locationIds',  'termMap.en']
      write = csv.DictWriter(outfile, fieldnames=fields)
      write.writeheader()
      for x in cursor:            
          x_id = x['_id']         
          x_locationIds =x.get('locationIds') 
          x_termMap =x['termMap'].get('en')                           
          z = {
              '_id': x_id,            
              'locationIds':str(x_locationIds).encode('ascii', 'ignore'), 
              'termMap.en':str(x_termMap).encode('ascii', 'ignore') }                        
          write.writerow(z)
  </code></pre>
  
  <p>the output is
  _</p>
  
  <pre><code>id  locationIds termMap.en
  51dc52fec0d988a9547b5201    [u'00aaaaaaaaaaaaaaa5913490', u'00aaaaaaaaaaaaaaa6118158', u'00aaaaaaaaaaaaaaa5946768'] [u'abc', u'acuity', u'analyze', u'become', u'beverage']
  51dc52fec0d988a9547b5202    [u'00aaaaaaaaaaaaaaa5946768']   [u'abc', u'air', u'angles', u'apples', u'banana', u'bananas', u'because', u'beings', u'birds', u'bottom']
  </code></pre>
  
  <p>I tried to use many different ways, but I can not remove the u letters yet. please someone can help me.</p>