title: How to read a dataframe of encoded strings from csv in python
body: <p>Suppose I read an html website and I get a list of names, such as: 'Amiel, Henri-Frédéric'.</p>
  
  <p>In order to get the list of names I decode the html using the following code:</p>
  
  <pre><code>f = urllib.urlopen("http://xxx.htm")
  html = f.read()
  html=html.decode('utf8')
  t.feed(html)
  t.close()
  lista=t.data
  </code></pre>
  
  <p>At this point, the variable lista contains a list of names like:</p>
  
  <p>[u'Abatantuono, Diego',
  ... ,
  u'Amiel, Henri-Frédéric']</p>
  
  <p>Now I would like to:</p>
  
  <ol>
  <li>put these names inside a DataFrame;</li>
  <li>save the DataFrame in a csv file;</li>
  <li>read the csv in Python through a DataFrame</li>
  </ol>
  
  <p>For simplicity, let's take in consideration just the above name to complete steps 1 to 3. I would use the following code:</p>
  
  <pre><code>name=u'Amiel, Henri-Fr\xe9d\xe9ric'
  name=name.encode('utf8')
  array=[name]
  df=pd.DataFrame({'Names':array})
  df.to_csv('names')
  uni=pd.read_csv('names')
  uni #trying to read the csv file in a DataFrame
  </code></pre>
  
  <p>At this point i get the following error:</p>
  
  <pre><code>UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 67: invalid continuation byte      
  </code></pre>
  
  <p>If I substitute the last row of the above code with:</p>
  
  <pre><code>print uni
  </code></pre>
  
  <p>I can read the DataFrame but I don't think it is the right way to handle this issue.</p>
  
  <p>I red many questions posted by other users about this argument but I didn't get to solve this one.</p>