ENH: Allow rename_axis to specify index and columns arguments 
State: closed

- [x] closes #19978
- [x] tests added / passed
   - `test_rename_axis_mapper` for `DataFrame` and `Series`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Enhancement
name: MultiIndex

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20046?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@0d6cb3c`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #20046   +/-   ##
=========================================
  Coverage          ?   92.18%           
=========================================
  Files             ?      161           
  Lines             ?    51184           
  Branches          ?        0           
=========================================
  Hits              ?    47185           
  Misses            ?     3999           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (?)` | |
| #single | `42.23% <50%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20046?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/20046/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.81% <100%> (ø)` | |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/20046/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `98.41% <100%> (ø)` | |

------

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

this implementation needs to follow the coding standards that are present in ``.rename``, pls use this as a guide.

you have text saying that this has 2 calling conventions. This alone is making me -1 on this whole idea.
@jreback I'm not sure which coding standards that you are referring to in `.rename`. Can you be more specific? Note that for `.rename_axis`, the signature has to be different in order to preserve the deprecated behavior.

Secondly, with respect to the 2 calling conventions, that is true for `.rename` as well.  I just copied that documentation pattern from there.  Look at the comments from @jorisvandenbossche in #19978 where he suggested adding the `index` and `columns` keyword to `rename_axis`, which, IMHO, is a good idea.

@jreback See above.  Awaiting your feedback or maybe @jorisvandenbossche 
@Dr-Irv if you can rebase can have a look
@Dr-Irv can you rebase
Hello @Dr-Irv! Thanks for updating the PR.

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

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_alter_axes.py`](https://github.com/Dr-Irv/pandas/blob/f28246f6f48f19b176012a45438aaff7477cceba/pandas/tests/frame/test_alter_axes.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/test_pytables.py`](https://github.com/Dr-Irv/pandas/blob/f28246f6f48f19b176012a45438aaff7477cceba/pandas/tests/io/test_pytables.py) !

 - There are no PEP8 issues in the file [`pandas/tests/reshape/test_concat.py`](https://github.com/Dr-Irv/pandas/blob/f28246f6f48f19b176012a45438aaff7477cceba/pandas/tests/reshape/test_concat.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_alter_axes.py`](https://github.com/Dr-Irv/pandas/blob/f28246f6f48f19b176012a45438aaff7477cceba/pandas/tests/series/test_alter_axes.py) !

 - There are no PEP8 issues in the file [`pandas/tests/test_panel.py`](https://github.com/Dr-Irv/pandas/blob/f28246f6f48f19b176012a45438aaff7477cceba/pandas/tests/test_panel.py) !


@jreback Merged with latest master.  Current failure in travis was due to a network error.
@TomAugspurger @jorisvandenbossche if you'd have a look.
@jreback this is all green now.  See if the docs I added to whatsnew are what you are looking for.
can you rebase
@jreback merged in latest master.  All green
@jreback Changes made, and all green.
Could also maybe use a short docnote in `advanced.rst`.
I've added a section on renaming to `advanced.rst`.
@TomAugspurger I did the changes.  See remark at https://github.com/pandas-dev/pandas/pull/20046#discussion_r228236698 .  I didn't make a change there.

There was a failure in the CI due to a timeout on travis.  Rather than resubmit, I figured you could review what's here and see if any other changes are needed.
@jreback @TomAugspurger all green
@jreback @TomAugspurger Almost all Green, but the failure was due to something on Azure "before install".  Let me know if there are more changes, and if there is some way to get that job to run again.
@Dr-Irv ok lgtm. can you rebase, lots of isort things going on. ping on green.
@jreback merged with latest and all green
Thanks!