pydata/pandas — pull request #6533 by hayd (2014-03-03 23:54:07+00:00)
Title: API change in groupby head and tail

BUG/API groupby head and tail act like filter, since they dont aggregage fixes column selection

Breaking API change to groupby head and tail, these were never aggregated output, so should not have the group labels as the index, it should always filter. (It was a legacy from when this was `g.apply(lambda x: x.head(n))`.)

```
as_index : boolean, default True
For aggregated output, return object with group labels as the
index. Only relevant for DataFrame input. as_index=False is
effectively "SQL-style" grouped output
```

Also fixes the column selection for head and tail #5755 #6524.

cc @jreback @TomAugspurger