pydata/pandas — pull request #8148 by behzadnouri (2014-08-30 02:31:57+00:00)
Title: BUG: use stable sort for group_index in groupby

Following on https://github.com/pydata/pandas/pull/8128, for certain `groupby` operations such as,

df.groupby(key)[col].transfrom('first')
it is necessary to use stable sort for group indices. As a result, `numpy.argsort` should be called with argument `kind='mergesort'`.