title: Mixed types of elements in DataFrame's column
body: <p>Consider the following three <code>DataFrame</code>'s:</p>
  
  <pre><code>df1 = pd.DataFrame([[1,2],[4,3]])
  df2 = pd.DataFrame([[1,.2],[4,3]])
  df3 = pd.DataFrame([[1,'a'],[4,3]])
  </code></pre>
  
  <p>Here are the types of the second column of the <code>DataFrame</code>'s:</p>
  
  <pre><code>In [56]: map(type,df1[1])
  Out[56]: [numpy.int64, numpy.int64]
  
  In [57]: map(type,df2[1])
  Out[57]: [numpy.float64, numpy.float64]
  
  In [58]: map(type,df3[1])
  Out[58]: [str, int]
  </code></pre>
  
  <p>In the first case, all <code>int</code>'s are casted to <code>numpy.int64</code>. Fine. In the third case, there is basically no casting. However, in the second case, the integer (<code>3</code>) is casted to <code>numpy.float64</code>; probably since the other number is a float.</p>
  
  <p>How can I control the casting? In the second case, I want to have either <code>[float64, int64]</code> or <code>[float, int]</code> as types.</p>
  
  <h2>Workaround:</h2>
  
  <p>Using a callable printing function there can be a workaround as showed <a href="http://nbviewer.ipython.org/gist/drorata/8b6d9332c05b272426f1" rel="noreferrer">here</a>.</p>
  
  <pre><code>def printFloat(x):
      if np.modf(x)[0] == 0:
          return str(int(x))
      else:
          return str(x)
  pd.options.display.float_format = printFloat
  </code></pre>