<h4 dir="auto">A small, complete example of the issue</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
In [2]: df = pd.DataFrame({'float' : range(4),
   ...:                    'int'   : range(4)},
   ...:                   index=pd.MultiIndex.from_product([[1,2]]*2))

In [3]: df['float'] = df['float'].astype(float)

In [4]: df.loc[(1,), 'int']
Out[4]: 
1    0
2    1
Name: int, dtype: int64
"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'float'</span> : <span class="pl-en">range</span>(<span class="pl-c1">4</span>),
   ...:                    <span class="pl-s">'int'</span>   : <span class="pl-en">range</span>(<span class="pl-c1">4</span>)},
   ...:                   <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>.<span class="pl-en">from_product</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">2</span>]]<span class="pl-c1">*</span><span class="pl-c1">2</span>))

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">df</span>[<span class="pl-s">'float'</span>] <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'float'</span>].<span class="pl-en">astype</span>(<span class="pl-s1">float</span>)

<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">loc</span>[(<span class="pl-c1">1</span>,), <span class="pl-s">'int'</span>]
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]: 
<span class="pl-c1">1</span>    <span class="pl-c1">0</span>
<span class="pl-c1">2</span>    <span class="pl-c1">1</span>
<span class="pl-v">Name</span>: <span class="pl-s1">int</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<p dir="auto">Right!</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: df.loc[(1,), 'int'].loc[1]
Out[5]: 0"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">loc</span>[(<span class="pl-c1">1</span>,), <span class="pl-s">'int'</span>].<span class="pl-s1">loc</span>[<span class="pl-c1">1</span>]
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: <span class="pl-c1">0</span></pre></div>
<p dir="auto">Right!</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
In [6]: df.loc[(1,1), 'int']
Out[6]: 0.0
"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">loc</span>[(<span class="pl-c1">1</span>,<span class="pl-c1">1</span>), <span class="pl-s">'int'</span>]
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: <span class="pl-c1">0.0</span></pre></div>
<p dir="auto">Wrong!</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Still an integer.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
In [7]: pd.show_versions()
## INSTALLED VERSIONS
<p dir="auto">commit: None<br>
python: 3.5.1.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.5.0-2-amd64<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: it_IT.utf8<br>
LOCALE: it_IT.UTF-8</p>
<p dir="auto">pandas: 0.19.0+1.g96b364a<br>
nose: 1.3.7<br>
pip: 1.5.6<br>
setuptools: 18.4<br>
Cython: 0.23.4<br>
numpy: 1.10.4<br>
scipy: 0.16.0<br>
statsmodels: 0.8.0.dev0+f80669e<br>
xarray: None<br>
IPython: 5.1.0.dev<br>
sphinx: 1.4.5<br>
patsy: 0.3.0-dev<br>
dateutil: 2.2<br>
pytz: 2012c<br>
blosc: None<br>
bottleneck: 1.1.0<br>
tables: 3.2.2<br>
numexpr: 2.5<br>
matplotlib: 1.5.1<br>
openpyxl: None<br>
xlrd: 0.9.4<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.7.3<br>
lxml: None<br>
bs4: 4.4.0<br>
html5lib: 0.999<br>
httplib2: 0.9.1<br>
apiclient: 1.5.0<br>
sqlalchemy: 1.0.11<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: 2.38.0<br>
pandas_datareader: 0.2.1</p>
</details>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="176344670" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14205" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/14205/hovercard" href="https://github.com/pandas-dev/pandas/issues/14205">#14205</a></p>
<p dir="auto">The <code class="notranslate">.loc</code> method of <code class="notranslate">DataFrame</code> with different dtypes yields coerced type <strong>even if the resulting slice does only contain elements from one type</strong>. This happens only when selecting a single row.<br>
I can guess that this might be intended because the implementation of <code class="notranslate">loc</code> seems to first lookup the row <em>as a single Series</em>, doing the coercion and <em>then</em> applying the second (column) indexer.</p>
<p dir="auto">However, when the column indexer narrows down the selection such that the upcasting would not have been necessary in the first place, it can be very surprising and may even cause bugs (on user-side) if it goes unnoticed. (Like, "I was sure that those column was <code class="notranslate">int64</code>").</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd

&gt;&gt;&gt; d = pd.DataFrame(dict(a=[1.23]))
&gt;&gt;&gt; d[&quot;b&quot;] = 666  # adding column with int

&gt;&gt;&gt; d.info()  # info as expected (column b is int64 - fine)
&lt;class 'pandas.core.frame.DataFrame'&gt;
Int64Index: 1 entries, 0 to 0
Data columns (total 2 columns):
a    1 non-null float64
b    1 non-null int64
dtypes: float64(1), int64(1)
memory usage: 24.0 bytes

&gt;&gt;&gt; d.loc[0,&quot;b&quot;]  # UNEXPECTED: returning a single float
666.0

&gt;&gt;&gt; d.ix[0, &quot;b&quot;]  # OK: returns a single int
666

&gt;&gt;&gt; d.loc[[0], &quot;b&quot;]  # OK
0    666
Name: b, dtype: int64"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-en">dict</span>(<span class="pl-s1">a</span><span class="pl-c1">=</span>[<span class="pl-c1">1.23</span>]))
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span>[<span class="pl-s">"b"</span>] <span class="pl-c1">=</span> <span class="pl-c1">666</span>  <span class="pl-c"># adding column with int</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span>.<span class="pl-en">info</span>()  <span class="pl-c"># info as expected (column b is int64 - fine)</span>
<span class="pl-c1">&lt;</span><span class="pl-k">class</span> <span class="pl-s">'pandas.core.frame.DataFrame'</span><span class="pl-c1">&gt;</span>
<span class="pl-v">Int64Index</span>: <span class="pl-c1">1</span> <span class="pl-s1">entries</span>, <span class="pl-c1">0</span> <span class="pl-s1">to</span> <span class="pl-c1">0</span>
<span class="pl-v">Data</span> <span class="pl-en">columns</span> (<span class="pl-s1">total</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>):
<span class="pl-s1">a</span>    <span class="pl-c1">1</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">null</span> <span class="pl-s1">float64</span>
<span class="pl-s1">b</span>    <span class="pl-c1">1</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">null</span> <span class="pl-s1">int64</span>
<span class="pl-s1">dtypes</span>: <span class="pl-en">float64</span>(<span class="pl-c1">1</span>), <span class="pl-en">int64</span>(<span class="pl-c1">1</span>)
<span class="pl-s1">memory</span> <span class="pl-s1">usage</span>: <span class="pl-c1">24.0</span> <span class="pl-s1">bytes</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span>.<span class="pl-s1">loc</span>[<span class="pl-c1">0</span>,<span class="pl-s">"b"</span>]  <span class="pl-c"># UNEXPECTED: returning a single float</span>
<span class="pl-c1">666.0</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span>.<span class="pl-s1">ix</span>[<span class="pl-c1">0</span>, <span class="pl-s">"b"</span>]  <span class="pl-c"># OK: returns a single int</span>
<span class="pl-c1">666</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">d</span>.<span class="pl-s1">loc</span>[[<span class="pl-c1">0</span>], <span class="pl-s">"b"</span>]  <span class="pl-c"># OK</span>
<span class="pl-c1">0</span>    <span class="pl-c1">666</span>
<span class="pl-v">Name</span>: <span class="pl-s1">b</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<p dir="auto">Feel free to close if the behavior s intended. Maybe this this a "bug" or an suggested API change. I dunno.</p>
<p dir="auto">Perhaps related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="92902147" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/10503" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/10503/hovercard" href="https://github.com/pandas-dev/pandas/issues/10503">#10503</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="58176167" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9519" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9519/hovercard" href="https://github.com/pandas-dev/pandas/issues/9519">#9519</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54570660" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9269" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9269/hovercard" href="https://github.com/pandas-dev/pandas/issues/9269">#9269</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116811012" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11594" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/11594/hovercard" href="https://github.com/pandas-dev/pandas/issues/11594">#11594</a> ?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS
------------------
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Darwin
OS-release: 15.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8

pandas: 0.17.0
[...]"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS
------------------
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Darwin
OS-release: 15.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8

pandas: 0.17.0
[...]
</code></pre></div>