title: Python sqlalchemy error when creating the table
body: <p>I'm trying to get a <code>.csv</code> file, filter some columns and create a new MySQL table with the new filtered df.</p>
  <p>The issue is that I have one particular value within that <code>.csv</code> with a different char set, as you can see below (<code>'\ufeffY'</code>):</p>
  <pre><code>df['Supported'].unique() 
  array(['Y', '\ufeffY'], dtype=object)
  </code></pre>
  <p>After that, I created a new <code>df</code> filtered with the columns renamed. I'm trying normalize those values. First, I'm removing unwanted possible spaces and then converting it to lower case (this column's value from the .CSV file should have in theory only &quot;y&quot; or &quot;n&quot;)</p>
  <pre><code>df2['supported'] = df2['supported'].str.strip()
  df2['supported'] = df2['supported'].str.lower()
  </code></pre>
  <p>Then, I'm trying to set to <code>&quot;?&quot;</code> anything that is different from &quot;y&quot; or &quot;n&quot;, which I believe would fix that <code>'\ufeffY'</code> value from the original df.</p>
  <pre><code>df2.loc[~df2['supported'].isin(['y', 'n']), 'supported'] = '?'
  </code></pre>
  <p>If I check <code>df2['supported'].unique()</code> after the operation above, I got this:</p>
  <pre><code>array(['y', '?'], dtype=object)
  </code></pre>
  <p>I assumed that the <code>'?'</code> would be, maybe among other values, the <code>'\ufeffY'</code> that I'm trying to get rid of, and then I'm trying to use that <code>df2</code> with <code>sqlalchemy</code> to create a new table by this:</p>
  <pre><code>df2.to_sql('ServersList', engine, index=False, if_exists='replace',
                    dtype={'supported': sqlalchemy.types.Text,
                           'server_name':  sqlalchemy.types.Text,
                           'owner': sqlalchemy.types.Text,
                           'critical': sqlalchemy.types.Text,
                           'business_function': sqlalchemy.types.Text,
                           'IP': sqlalchemy.types.Text,
                           'activated': sqlalchemy.types.DateTime(),
                           'service_type': sqlalchemy.types.Text,
                           'platform': sqlalchemy.types.Text,
                           'OS': sqlalchemy.types.Text,
                           'classification': sqlalchemy.types.Text,
                           'support_team': sqlalchemy.types.Text,
                           'virtual_server': sqlalchemy.types.Text,
                           'host_name': sqlalchemy.types.Text,
                           'location': sqlalchemy.types.Text,
                           'log': sqlalchemy.types.DateTime()}
          )
  </code></pre>
  <p>And that is when I got the following error:</p>
  <pre><code>UnicodeEncodeError: 'charmap' codec can't encode character '\ufeff' in position 10: character maps to &lt;undefined&gt;
  </code></pre>
  <p>The message is pretty clear, but I thought that df2 would not have that value anymore and therefore it should work.</p>
  <p>Obviously I'm missing something here.</p>