<p dir="auto">Not certain if this is a bug or defined behaviour (but then the error message is not clear in any case).</p>
<p dir="auto">In 0.13.1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [28]: df = pd.DataFrame(np.random.randn(9).reshape(3,3), index=[0.1,0.2,0.2],
 columns=['a','b','c'])
In [29]: df
Out[29]:
            a         b         c
0.1  1.711117  1.218853 -1.322363
0.2  0.956266  0.230374 -1.005935
0.2 -0.137729 -0.993931 -0.902793

In [30]: df.ix[0.2,'a']
Out[30]: array([ 0.95626607, -0.13772877])

In [31]: df.ix[0.2]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
...
ValueError: Length mismatch: Expected axis has 0 elements, new values have 2 ele
ments"><pre class="notranslate"><code class="notranslate">In [28]: df = pd.DataFrame(np.random.randn(9).reshape(3,3), index=[0.1,0.2,0.2],
 columns=['a','b','c'])
In [29]: df
Out[29]:
            a         b         c
0.1  1.711117  1.218853 -1.322363
0.2  0.956266  0.230374 -1.005935
0.2 -0.137729 -0.993931 -0.902793

In [30]: df.ix[0.2,'a']
Out[30]: array([ 0.95626607, -0.13772877])

In [31]: df.ix[0.2]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
...
ValueError: Length mismatch: Expected axis has 0 elements, new values have 2 ele
ments
</code></pre></div>
<p dir="auto">In master, both (<code class="notranslate">df.loc[0.2]</code> and <code class="notranslate">df.loc[0.2, 'a']</code>) give this error message. Wile for integer index, this works.</p>
<p dir="auto">Series.unique returns an numpy array but np.unique(series) returns a series. Not sure if it is intentional but it might be better to keep both the calls consistent.</p>
<p dir="auto">In [173]: a[:10]<br>
Out[173]:<br>
0       4<br>
1     210<br>
2     210<br>
3     210<br>
4    3197<br>
5    3197<br>
6    3197<br>
7    3457<br>
8    3713<br>
9    3741</p>
<p dir="auto">In [174]: a[:10].unique()<br>
Out[174]: array([   4,  210, 3197, 3457, 3713, 3741])</p>
<p dir="auto">In [176]: np.unique(a[:10])<br>
Out[176]:<br>
0       4<br>
1     210<br>
4    3197<br>
7    3457<br>
8    3713<br>
9    3741</p>