API/CLN: Have toplevel pd.pivot mirror pivot instead of pivot_simple
State: closed

- [x] closes #22116
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


- Moved `pivot` from `pandas/core/reshape/reshape.py` to `pandas/core/reshape/pivot.py`
- Moved `pivot_simple` and `_slow_pivot` from `pandas/core/reshape/reshape.py` to `pandas/core/reshape/pivot.py` (only used by one panel test)
- Remapped top level `pd.pivot` to use `pivot` instead of `pivot_simple` 
- Added some additional tests for `pd.pivot`


Labels:
name: API Design
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22209?src=pr&el=h1) Report
> Merging [#22209](https://codecov.io/gh/pandas-dev/pandas/pull/22209?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/737b3297e2d03492acbbe74eca5dfc2eb62cf207?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/22209/graphs/tree.svg?src=pr&width=650&token=eZ4WkYLtcO&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/22209?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #22209      +/-   ##
==========================================
- Coverage   92.06%   92.06%   -0.01%     
==========================================
  Files         169      169              
  Lines       50698    50687      -11     
==========================================
- Hits        46676    46664      -12     
- Misses       4022     4023       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.47% <100%> (-0.01%)` | :arrow_down: |
| #single | `42.33% <43.47%> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22209?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/22209/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.54% <ø> (-0.03%)` | :arrow_down: |
| [pandas/core/reshape/api.py](https://codecov.io/gh/pandas-dev/pandas/pull/22209/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9hcGkucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22209/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.26% <100%> (ø)` | :arrow_up: |
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/22209/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `97.17% <100%> (+0.13%)` | :arrow_up: |
| [pandas/util/\_depr\_module.py](https://codecov.io/gh/pandas-dev/pandas/pull/22209/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX2RlcHJfbW9kdWxlLnB5) | `65.11% <0%> (-2.33%)` | :arrow_down: |

------

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

Ping @jreback. All green.
@jreback removed those unused methods and test and all green.
thanks @mroeschke nice clean!
We cannot simply change this, as this completely breaks existing usage of `pd.pivot`. This needs to go through a deprecation cycle (or need to think how to keep supporting the old usage).
We could keep `pivot_simple` (which was `pd.pivot` previously) and then add a depreciation warning to `pd.pivot` that its behavior will mirror `df.pivot` and to use `pivot_simple` instead.
That's certainly an option. 
I personally don't really know to what extent it would be useful to also keep the current behaviour of `pivot_simple` (so to not fully deprecate it). Will open an issue to not forget this.