Skip to content

Conversation

@jreback
Copy link
Contributor

@jreback jreback commented Aug 21, 2013

closes #4619

In [7]: df = DataFrame({"A": [0, 1, 2]})

In [8]: df
Out[8]: 
   A
0  0
1  1
2  2

In [9]: df.ix[[0,8,0]]
Out[9]: 
    A
0   0
8 NaN
0   0

In [10]: df = DataFrame({"A": list('abc')})

In [12]: df
Out[12]: 
   A
0  a
1  b
2  c

In [11]: df.ix[[0,8,0]]
Out[11]: 
     A
0    a
8  NaN
0    a

and this beauty here!

In [13]: df = DataFrame({'test': [5,7,9,11]}, index=['A','A','B','C'])

In [14]: df
Out[14]: 
   test
A     5
A     7
B     9
C    11

In [15]: df.ix[['A','A','E']]
Out[15]: 
   test
A     5
A     7
A     5
A     7
E   NaN

jreback added a commit that referenced this pull request Aug 21, 2013
BUG: Fix selection with ``ix/loc`` and non_unique selectors (GH4619)
@jreback jreback merged commit 9ea0d44 into pandas-dev:master Aug 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected result/segmentation fault with .ix/.loc (0.12.0)

1 participant