groupby.py compleated