title: Python cannot export to Stata due to unicode problem?
body: <p>I'm trying to export a dataframe in Python as a Stata dta. This is a slimmed version of the code I'm using:</p>
  <pre><code>import pandas as pd
  
  df_master = pd.read_stata(old_dta_location)
  
  # Do some data manipulation.
  
  df_master.to_stata(new_dta_location, {&quot;final_date&quot;: &quot;td&quot;}, write_index = False)
  </code></pre>
  <p>I get the following error when I do this:</p>
  <pre><code>UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 11: ordinal not in range(256)
  </code></pre>
  <p>I know there are other questions regarding unicode errors but as they are not related to Stata, options such as putting an argument like 'encoding = &quot;utf8&quot;' doesn't work.</p>
  <p>How can I fix this?</p>