Count Boolean values with .groupby()
Take the following dataframe:
```
df = pd.DataFrame({'ID':[1,2,1,1,2,3,4,4,4],
                   'Litmus':[False,False,True,True,False,False,True,True,True]})
```
I want to count the conditional number of True values, that is, I want to count the number of True values for each ID.

This works fine:
`df.groupby('ID')['Litmus'].sum()`

However, this does not:
`df[4:7].groupby('ID')['Litmus'].sum()`

To make it more interesting, this again works fine:
`df[4:8].groupby('ID')['Litmus'].sum()`

Bizarre behavior.

