title: Accessing a cell in a pandas DataFrame with MultiIndex loses type information
body: <p>When I create a pandas <code>DataFrame</code> with <code>MultiIndex</code>, accessing a single cell loses type information:</p>
  <pre class="lang-py prettyprint-override"><code>df2 = pd.DataFrame([{&quot;a&quot;:1.0,&quot;b&quot;:2,&quot;c&quot;:3,&quot;d&quot;:4}]).set_index([&quot;c&quot;,&quot;d&quot;])
  </code></pre>
  <p><code>df2.dtypes</code> is</p>
  <pre class="lang-py prettyprint-override"><code>a    float64
  b      int64
  dtype: object
  </code></pre>
  <p>but <code>df2.loc[(3,4),&quot;b&quot;]</code> returns <code>2.0</code> of type <code>numpy.float64</code> instead of <code>2</code> of type <code>numpy.int64</code>.</p>
  <p>Cf.</p>
  <pre class="lang-py prettyprint-override"><code>df1 = pd.DataFrame([{&quot;a&quot;:1.0,&quot;b&quot;:2,&quot;c&quot;:3}]).set_index(&quot;c&quot;)
  </code></pre>
  <p>where <code>df1.loc[3,&quot;b&quot;]</code> returns <code>2</code> of type <code>numpy.int64 </code>.</p>
  <p><strong>Is this a <a href="https://github.com/pandas-dev/pandas/issues/41369" rel="nofollow noreferrer">bug</a> or am I doing something wrong?</strong></p>
  <p><strong>NB</strong>: <code>at</code> (used instead of <code>loc</code>) returns the value of the correct type for both <code>df1</code> and <code>df2</code>.</p>