move rename functionality out of internals
State: closed

- [ ] 
closes #16045
<b>update</b>Not anymore
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

@jorisvandenbossche can you confirm this is what you had in mind in that issue?

Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

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

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

```diff
@@            Coverage Diff            @@
##           master   #21924     +/-   ##
=========================================
+ Coverage   92.04%   92.15%   +0.1%     
=========================================
  Files         169      169             
  Lines       50782    50698     -84     
=========================================
- Hits        46742    46720     -22     
+ Misses       4040     3978     -62
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.56% <100%> (+0.1%)` | :arrow_up: |
| #single | `42.31% <75%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21924?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/managers.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL21hbmFnZXJzLnB5) | `96.45% <100%> (-0.03%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.67% <100%> (+0.23%)` | :arrow_up: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `83.54% <0%> (+0.05%)` | :arrow_up: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.54% <0%> (+0.06%)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.87% <0%> (+0.08%)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `85.96% <0%> (+0.2%)` | :arrow_up: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `95.74% <0%> (+0.21%)` | :arrow_up: |
| [pandas/core/groupby/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9nZW5lcmljLnB5) | `87.04% <0%> (+0.21%)` | :arrow_up: |
| [pandas/core/groupby/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9vcHMucHk=) | `96.79% <0%> (+0.22%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/pandas-dev/pandas/pull/21924/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21924?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/21924?src=pr&el=footer). Last update [e2e1a10...97ea653](https://codecov.io/gh/pandas-dev/pandas/pull/21924?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jorisvandenbossche gentle ping; the issue that motivated this PR was yours
Hello @jbrockmendel! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/generic.py`](https://github.com/jbrockmendel/pandas/blob/3688125dda1a39e938198dcbe9b87dc313639208/pandas/core/generic.py) !

 - There are no PEP8 issues in the file [`pandas/core/internals/managers.py`](https://github.com/jbrockmendel/pandas/blob/3688125dda1a39e938198dcbe9b87dc313639208/pandas/core/internals/managers.py) !


Updated to get only add_prefix/add_suffix out of internals, leaves `rename_axis` in internals, so no longer closes #16045.
@jorisvandenbossche this has been scaled back significantly, but still addresses part of the Issue you opened.  Thoughts?
thanks!