changed "fun !r" -> "repr(fun)"
As described in the following issue
, usage of !r is currently redundant and so changing to f strings in place of it.

- [x] ref https://github.com/pandas-dev/pandas/issues/29886
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Hello @souravs17031999! 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:





* In the file [`pandas/core/strings.py`](https://github.com/pandas-dev/pandas/blob/fc5135ef32e3118dd90cf783574ee792939d38e8/pandas/core/strings.py):

> [Line 1938:1](https://github.com/pandas-dev/pandas/blob/fc5135ef32e3118dd90cf783574ee792939d38e8/pandas/core/strings.py#L1938): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace

 I will open new PR after going through it again.