title: How to solve UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte in python
body: <p>I scrawled down the data and had to save the dataframe as utf-16 (Unicode) since the Latin/Spanish words were shown weird in the form of utf-8. I used the following code to save the dataframe:</p>
  
  <pre><code> df.to_csv("blogdata.csv", encoding = "utf-16", sep = "\t", index = False)
  </code></pre>
  
  <p>when I try to read the file to clean the data using the following code:</p>
  
  <pre><code> blogdata = pd.read_csv('c:/Users/hyoungm?Downloads/blogdata.csv')
  </code></pre>
  
  <p>it shows the following error.</p>
  
  <hr>
  
  <p>UnicodeDecodeError                        Traceback (most recent call last)
   in ()
  ----> 1 blogdata = pd.read_csv('C:/Users/hyoungm/Downloads/blogdata.csv')</p>
  
  <p>...</p>
  
  <p>pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader.<strong>cinit</strong>()</p>
  
  <p>pandas_libs\parsers.pyx in pandas._libs.parsers.TextReader._get_header()</p>
  
  <p>UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte</p>
  
  <p>Please see my screenshot here:
  <a href="https://i.stack.imgur.com/5amR9.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/5amR9.jpg" alt="enter image description here"></a></p>
  
  <p>I don't know either how to save the original data without losing those Laint/Spanish words within English sentences or how to read Unicode data file. Can anybody please help me with solving this issue?</p>
  
  <p>Thank you very much!</p>