title: Python - Using accented letters
body: <p>I'm having an issue with <strong>accented letters</strong> in Python. It can't really replace accented letters with non-accented letters because it won't recognize the words when searching for them in the dataframe.</p>
  <p>The code below adds to new columns to the dataframe '<strong>df_sb</strong>' and combines a string (Section Début or Section da Tête) with the content of another column.</p>
  <p>The thing is, when I run the block below in my main script file, it will correctly write and display the words with accented letters (<em>Section Début</em> and <em>Section da Tête</em>). However, this needs to be executed in a different file by calling a function. When I call the function and it returns me the df_sb dataframe (with the two columns), it messes up the accented letters for some reason. I don't understand why this is happening.</p>
  <p><strong>BLOCK 1</strong>:</p>
  <pre><code>from ipynb.fs.full.Untitled1 import *
  df_sb = func_1()
  </code></pre>
  <p><strong>BLOCK 2:</strong></p>
  <pre><code>def func_1():
      import pandas as pd
      df_sb = ['One' , 'Two', 'Three']
      df_sb = pd.DataFrame(df_sb)
      df_sb.columns = ['NAME']
  
  
      for i in range(0,len(df_sb['NAME']),1):
          df_sb['SECTION_DEBUT'] = &quot;Section Début: &quot; + df_sb.loc[:,'NAME'] + &quot; &quot;
          df_sb['SECTION_TETE'] = &quot;Section da Tête: &quot; + df_sb.loc[:,'NAME'] + &quot; &quot;
      return(df_sb)
  </code></pre>
  <p>-&gt; Output when calling and running function on the same file:</p>
  <p><a href="https://i.stack.imgur.com/UJdXz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UJdXz.png" alt="enter image description here" /></a></p>
  <p>-&gt; Output when calling and running function on a <strong>different file</strong>:
  <a href="https://i.stack.imgur.com/PCKgd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PCKgd.png" alt="enter image description here" /></a></p>
  <p>How should deal with this?</p>