BUG: fix error for reset_index() with index.name in MultiIndex columns
State: closed

 - [x] closes #16120
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [x] whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=h1) Report
> Merging [#16126](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6ad32d23c52416b4e6195c873a23be5065b85228?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16126/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16126      +/-   ##
==========================================
- Coverage   90.84%   90.83%   -0.01%     
==========================================
  Files         159      159              
  Lines       50774    50774              
==========================================
- Hits        46124    46123       -1     
- Misses       4650     4651       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.62% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.33% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.44% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=footer). Last update [6ad32d2...c6dec63](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=h1) Report
> Merging [#16126](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6ad32d23c52416b4e6195c873a23be5065b85228?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16126/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16126      +/-   ##
==========================================
- Coverage   90.84%   90.83%   -0.01%     
==========================================
  Files         159      159              
  Lines       50774    50774              
==========================================
- Hits        46124    46123       -1     
- Misses       4650     4651       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.62% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.33% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.44% <100%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=footer). Last update [6ad32d2...c6dec63](https://codecov.io/gh/pandas-dev/pandas/pull/16126?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks!