Fix groupby().transform() example in cookbook.rst
Merge pull request #9007 from SteveSimmons/fix-8944-cookbook-transform

Fix groupby().transform() example in cookbook.rst