Let\'s say that I have some data generated as follows:
N = 20 m = 3 data = np.random.normal(size=(N,m)) + np.random.normal(size=(N,m))**3
and t
In [10]: df.groupby('indx').transform(lambda x: (x - x.mean()) / x.std())
should do it.