DOC: Adding examples to DataFrameGroupBy.rank #38972
- [x] closes #38972
- [x] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

Hello @debnathshoham! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2021-07-11 19:41:09 UTC Hi @mzeitlin11 , just made the suggested changes. I have also attached how it looks now. Please let me know if this looks fine.
![Screenshot 2021-07-06 at 9 32 34 PM](https://user-images.githubusercontent.com/6472290/124632269-d20b7800-dea1-11eb-9149-57ddc45858d8.png)
 please review > please review

Sorry for later review, `pandas` is volunteer, so review may sometimes take a while :) Left some small comments, otherwise LGTM! @debnathshoham of note: The docstring validation is failing

```
Error: /home/runner/work/pandas/pandas/pandas/core/groupby/groupby.py:2638:GL07:pandas.core.groupby.DataFrameGroupBy.rank:Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Examples
``` thanks @mroeschke . I believe it would be fixed now. Thanks @debnathshoham 