PERF #6570 patch by @jreback
TST groupby selected object, more tests