title: python pandas column dtype=object causing merge to fail with: DtypeWarning: Columns have mixed types
body: <p>I am trying to merge two dataframes <code>df1, df2</code> on <code>Customer_ID</code> column. It seems that <code>Customer_ID</code> has the same data type (<code>object</code>) in both. </p>
  
  <p>df1: </p>
  
  <pre><code>Customer_ID |  Flag
  12345           A
  </code></pre>
  
  <p>df2: </p>
  
  <pre><code>Customer_ID | Transaction_Value
  12345           258478
  </code></pre>
  
  <p>When I merge the two tables:</p>
  
  <pre><code>new_df = df2.merge(df1, on='Customer_ID', how='left')
  </code></pre>
  
  <p>For some Customer_IDs it worked and for others it didn't. FOr this example, I would get this result:</p>
  
  <pre><code>Customer_ID | Transaction_Value | Flag
      12345           258478         NaN
  </code></pre>
  
  <p>I checked the data types and they are the same: </p>
  
  <pre><code>df1.info()
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  Int64Index: 873353 entries, 0 to 873352
  Data columns (total 2 columns):
  Customer_ID    873353 non-null object
  Flag      873353 non-null object
  dtypes: object(2)
  memory usage: 20.0+ MB
  
  df2.info()
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  Int64Index: 873353 entries, 0 to 873352
  Data columns (total 2 columns):
  Customer_ID    873353 non-null object
  Transaction_Value      873353 int64
  dtypes: object(2)
  memory usage: 20.0+ MB
  </code></pre>
  
  <p>When I uploaded df1, I did get this message:</p>
  
  <pre><code>C:\Users\xxx\AppData\Local\Continuum\Anaconda2\lib\site-packages\IPython\core\interactiveshell.py:2717: DtypeWarning: Columns (1) have mixed types. Specify dtype option on import or set low_memory=False.
    interactivity=interactivity, compiler=compiler, result=result)
  </code></pre>
  
  <p>When I wanted to check, if a customer ID exists, I realized that I have to specify it differently in the two dataframes. </p>
  
  <pre><code>df1.loc[df1['Customer_ID'] == 12345]
  
  df2.loc[df2['Customer_ID'] == '12345']
  </code></pre>