Faster pandas by

We no longer rely on apply(lambda df: compute(t.apply, df))

We now precompute the apply, then compute the grouper, then perform a
join/groupby.

This takes an 8 minute computation down to 8 seconds for me.  Note that we're not being very fast now, it's just that before we were being dumb and slow.

http://stackoverflow.com/questions/23924888/pandas-groupby-series-with-dataframe