groupby ST loop iterator example