pydata/pandas — pull request #5533 by hayd (2013-11-17 04:47:17+00:00)
Title: PERF faster head, tail and size groupby methods

Try again with #5518.

Massive gains in groupby head and tail, adds more tests for these, slight speed improvement in size (not as much as I'd hoped, basically iterating through grouper.indices is slow :( ).

*As mentioned before, I added a helper function to prepend as_index to index (if that makes __any__ sense), I think it could be faster, and also using it in apply may fix some bugs there...*