Skip to content

Partial fancy indexing using ints does not work on MultiIndex #107

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

Closed
wesm opened this issue Aug 22, 2011 · 1 comment
Closed

Partial fancy indexing using ints does not work on MultiIndex #107

wesm opened this issue Aug 22, 2011 · 1 comment
Labels
Milestone

Comments

@wesm
Copy link
Member

wesm commented Aug 22, 2011

In [44]: import pandas.rpy.common as com

In [45]: cw = com.load_data('ChickWeight')

         Chick  weight
1  0.0   10.5   41.4  
   2.0   10.5   47.25 
   4.0   10.11  56.47 
   6.0   10.11  66.79 
   8.0   10.11  79.68 
   10.0  10.11  93.05 
   12.0  10.11  108.5 
   14.0  9.778  123.4 
   16.0  9.471  144.6 
   18.0  9.471  158.9 
   20.0  9.471  170.4 
   21.0  9.562  177.8 
2  0.0   25.5   40.7  
   2.0   25.5   49.4  
   4.0   25.5   59.8  
   6.0   25.5   75.4  
   8.0   25.5   91.7  

In [47]: cw.groupby(['Diet', 'Time']).mean().ix[1]
Out[47]: 
Chick     10.5
weight    47.25
@wesm
Copy link
Member Author

wesm commented Sep 5, 2011

fixed here (though in latest rpy the Diet column flows through as object dtype)

wesm@4e50981

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant