Bug fix - rename dataframe reset index
- [x] closes #6878
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hello @weikhor! 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 2022-03-29 15:32:04 UTC Hi I still working on this. That is a lot of other test cases failed from this code changes. I need more time. Thank Hi Currently, I am in stuck in failed `Doc Build and Upload` pipeline. I suspect the error  is due to documentation I write inside this file `pandas/core/frame.py`, but unfortunately I have not ideas what cause error after looking through the logs from `Doc Build and Upload` pipeline. Appreciate some guidance. Thank. ```
/home/runner/work/pandas/pandas/doc/source/conf.py:643: FutureWarning: pandas.Float64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
  obj = getattr(obj, part)
WARNING: 
>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/user_guide/io.rst at block ending on line 1569
looking for now-outdated files... none found
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Input In [182], in <cell line: 1>()
----> 1 print(open("data/mindex_ex.csv").read())

FileNotFoundError: [Errno 2] No such file or directory: 'data/mindex_ex.csv'

<<<-------------------------------------------------------------------------
WARNING: 
>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/user_guide/io.rst at block ending on line 1579
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Input In [183], in <cell line: 1>()
----> 1 df = pd.read_csv("data/mindex_ex.csv", index_col=[0, 1])

File ~/work/pandas/pandas/pandas/util/_decorators.py:311, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs)
    305 if len(args) > num_allow_args:
    306     warnings.warn(
    307         msg.format(arguments=arguments),
    308         FutureWarning,
    309         stacklevel=stacklevel,
    310     )
--> 311 return func(*args, **kwargs)
```
There is still issue ` Use pandas.Index with the appropriate dtype instead`. Will look into this TOÀN BỘ LỰC LƯỢNG MỖI QUỐC GIA 4100 QUÂN LÍNH VỀ VIỆT NAM TRƯỚC ĐỂ BẢO VỆ SAU LÀ XÂY DỰNG CÔNG TRÌNH PHẠM VĂN TƯỜNG
________________________________
Từ: Jeff Reback ***@***.***>
Đã gửi: 18 Tháng Ba 2022 7:52 SA
Đến: pandas-dev/pandas ***@***.***>
Cc: Subscribed ***@***.***>
Chủ đề: Re: [pandas-dev/pandas] Bug fix - rename dataframe reset index (PR #46167)


@jreback approved this pull request.

—
Reply to this email directly, view it on GitHub<https://github.com/pandas-dev/pandas/pull/46167#pullrequestreview-913845395>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJLD4SIE4DJHQ5NQF6JTDF3VAPHT5ANCNFSM5PO5M7DA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
 @jreback 
Hi, from my local computer, I run 
```
doc/make.py --warnings-are-errors
```

From the `file pandas/core/frame.py`, it shows error from below doc. 
```
>>> df.reset_index(names='name')
     name   class  max_speed
0  falcon    bird      389.0
1  parrot    bird       24.0
2    lion  mammal       80.5
3  monkey  mammal        NaN
```
```
/home/pandas/doc/source/whatsnew/v1.4.1.rst:70: WARNING: Cannot find contributors for range 'v1.4.0..v1.4.1': Cmd('git') failed due to: exit code(128)
  cmdline: git log --grep=Co-authored --pretty=%b v1.4.0..v1.4.1
  stderr: 'fatal: ambiguous argument 'v1.4.0..v1.4.1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
/home/pandas/doc/source/whatsnew/v1.4.2.rst:65: WARNING: Cannot find contributors for range 'v1.4.1..v1.4.2|HEAD': Cmd('git') failed due to: exit code(128)
  cmdline: git log --grep=Co-authored --pretty=%b v1.4.1..HEAD
  stderr: 'fatal: ambiguous argument 'v1.4.1..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
```
Currently have not idea how to resolve this.  @jreback 

Hi I try many rounds of failures. It keep showing this errors in pipeline `Doc Build and Upload`.  sphinx  documentation
```
WARNING: 
>>>-------------------------------------------------------------------------
looking for now-outdated files... none found
Exception in /home/runner/work/pandas/pandas/doc/source/user_guide/io.rst at block ending on line 1569
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Input In [182], in <cell line: 1>()
----> 1 print(open("data/mindex_ex.csv").read())

FileNotFoundError: [Errno 2] No such file or directory: 'data/mindex_ex.csv'

<<<-------------------------------------------------------------------------
WARNING: 
>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/user_guide/io.rst at block ending on line 1579
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Input In [183], in <cell line: 1>()
----> 1 df = pd.read_csv("data/mindex_ex.csv", index_col=[0, 1])
``` 
The reason is `get_default_index_names` for object `Index` I created in `pandas/core/indexes/base.py`. I have not clue what cause this. It is the reason I do not include new function `get_default_index_names` I create in `doc/source/whatsnew/v1.5.0.rst`?
  thanks @weikhor very nice!