added example of pandas.DataFrame.reorder_levels in frame.py #42124
State: closed

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


Labels:

Comments:
Hello @Ashis26! Thanks for opening 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/frame.py`](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py):

> [Line 10747:76](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10747): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 10755:89](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10755): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (90 > 88 characters)
> [Line 10766:1](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10766): [E305](https://duckduckgo.com/?q=pep8%20E305) expected 2 blank lines after class or function definition, found 0
> [Line 10767:5](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E225](https://duckduckgo.com/?q=pep8%20E225) missing whitespace around operator
> [Line 10767:29](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ':'
> [Line 10767:32](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:34](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:36](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:38](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:41](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:50](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ':'
> [Line 10767:55](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:59](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:63](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:67](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:72](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:79](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ':'
> [Line 10767:86](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:89](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (114 > 88 characters)
> [Line 10767:92](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:100](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10767:106](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10767): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10768:25](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10768): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10768:35](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10768): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10768:48](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10768): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10770:2](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10770): [E111](https://duckduckgo.com/?q=pep8%20E111) indentation is not a multiple of four
> [Line 10770:2](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10770): [E113](https://duckduckgo.com/?q=pep8%20E113) unexpected indentation
> [Line 10772:14](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10772): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 10779:12](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10779): [E225](https://duckduckgo.com/?q=pep8%20E225) missing whitespace around operator
> [Line 10779:22](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10779): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10780:5](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10780): [E225](https://duckduckgo.com/?q=pep8%20E225) missing whitespace around operator
> [Line 10780:38](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10780): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 10780:41](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10780): [E261](https://duckduckgo.com/?q=pep8%20E261) at least two spaces before inline comment
> [Line 10784:14](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10784): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 10791:63](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10791): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file
> [Line 10791:63](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10791): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file
> [Line 10791:63](https://github.com/pandas-dev/pandas/blob/6308b4954e4d303baf1c3c27c2f1f8be74b3b06e/pandas/core/frame.py#L10791): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file


Hey - please see [here](https://pandas.pydata.org/docs/development/contributing.html#pre-commit) for how to fixup the pre-commit failures
closing as stale, feel free to ping me if you want to work on this again