DOC: Fix documentation for pandas.Series.transform #35870
- [x] closes #35870
- [x] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Thanks @onshek 