Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: duplicate selection with missing values raises #5835

Closed
jreback opened this issue Jan 3, 2014 · 0 comments · Fixed by #5849
Closed

BUG: duplicate selection with missing values raises #5835

jreback opened this issue Jan 3, 2014 · 0 comments · Fixed by #5849
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 3, 2014

Hard to reprod.

Select from a duplicate indexed axis in a frame with ix where part of the
selection set is missing

In [22]: df = DataFrame(np.random.randn(5,5),columns=['A.1','B.1','B.2','B.3','A.2'],index=date_range('20130101',periods=5))

In [23]: df2 = df.rename(columns=lambda x: x.split('.')[0])

In [24]: df2
Out[24]: 
                   A         B         B         B         A
2013-01-01 -1.029245 -0.782139  0.584956  1.097301 -0.150675
2013-01-02 -0.723246 -0.356150 -0.441952  0.027012 -1.851583
2013-01-03 -1.001412  0.129464  0.093433  0.952615 -1.338390
2013-01-04  0.165987  0.227918  0.557940 -0.102501 -1.194053
2013-01-05  0.249493 -1.102096 -0.977755 -0.529540  0.783277

[5 rows x 5 columns]

In [25]: df2.ix[:,['A','B','C']]

AssertionError: Number of manager items must equal union of block items
# manager items: 6, # tot_items: 14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
1 participant