BUG: doc example in groupby.rst (GH7559 / GH7628)

closes #7628