DEPR: remove tm.makePanel and all usages
State: closed


Labels:
name: Deprecate
description: Functionality to remove in pandas
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25231?src=pr&el=h1) Report
> Merging [#25231](https://codecov.io/gh/pandas-dev/pandas/pull/25231?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1d1b14c7ea7c3e497b66453cacbb8230b26cb6a6?src=pr&el=desc) will **decrease** coverage by `0.26%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25231      +/-   ##
==========================================
- Coverage   92.15%   91.89%   -0.27%     
==========================================
  Files         166      166              
  Lines       52294    52281      -13     
==========================================
- Hits        48194    48046     -148     
- Misses       4100     4235     +135
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.36% <ø> (-0.26%)` | :arrow_down: |
| #single | `42.21% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25231?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.74% <ø> (-0.24%)` | :arrow_down: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `80.26% <0%> (-13.61%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `94.68% <0%> (-1.71%)` | :arrow_down: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `93.75% <0%> (-0.54%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.2% <0%> (-0.5%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25231?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/25231?src=pr&el=footer). Last update [1d1b14c...f7e8585](https://codecov.io/gh/pandas-dev/pandas/pull/25231?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/25231?src=pr&el=h1) Report
> Merging [#25231](https://codecov.io/gh/pandas-dev/pandas/pull/25231?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1d1b14c7ea7c3e497b66453cacbb8230b26cb6a6?src=pr&el=desc) will **decrease** coverage by `0.26%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25231      +/-   ##
==========================================
- Coverage   92.15%   91.89%   -0.27%     
==========================================
  Files         166      166              
  Lines       52294    52281      -13     
==========================================
- Hits        48194    48046     -148     
- Misses       4100     4235     +135
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.36% <ø> (-0.26%)` | :arrow_down: |
| #single | `42.21% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25231?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.74% <ø> (-0.24%)` | :arrow_down: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `80.26% <0%> (-13.61%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `94.68% <0%> (-1.71%)` | :arrow_down: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `93.75% <0%> (-0.54%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/25231/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.2% <0%> (-0.5%)` | :arrow_down: |

------

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

@WillAyd I get a `unexpectedly closed the connection` from codecov.io so i cant see the detailed report, but i'm not sure why you would approve this with a drop in code coverage in core modules other than panel. Am i missing something?
Didn’t look at the coverage report just code. Seemed to only pull out deprecated parts. 

Thanks for questioning though - is your concern that we are dropping tests for non-deprecated parts of code base?

Sent from my iPhone

> On Feb 8, 2019, at 11:42 AM, Simon Hawkins <notifications@github.com> wrote:
> 
> @WillAyd I get a unexpectedly closed the connection from codecov.io so i cant see the detailed report, but i'm not sure why you would approve this with a drop in code coverage in core modules other than panel. Am i missing something?
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.

my concern is that makePanel.to_fame is part of a least one test setup and the tested behaviour maybe non-panel related.
> my concern is that makePanel.to_fame is part of a least one test setup and the tested behaviour maybe non-panel related.

I'm guessing you're referring to the test in test_reshape.  There is another test where I manually reconstructed the equivalent of `tm.makePanel().to_frame()`.  We could put that code into `tm` and re-use it in the reshape test.  Would that handle your concern?
considering how difficult it can sometimes be to get a single line of code into the codebase, there is an incredible amount of value in the 1600+ lines of code being removed. being in the dark about the code coverage at the moment does make me concerned about a potential loss of value.
> I'm guessing you're referring to the test in test_reshape. There is another test where I manually reconstructed the equivalent of `tm.makePanel().to_frame()`. We could put that code into `tm` and re-use it in the reshape test. Would that handle your concern?

@jbrockmendel: probably not necessary, i briefly had access to the coverage report and I couldn't see that as being an issue.

@WillAyd: lgtm 
@simonjayhawkins we have *wanted* to remove this code for quite some time :-D

and removing codes IS much easier to approve than adding, reducing complexity is always a +1 from me (granted *removing* tests requires a fair amount of scrutiny).
thanks @jbrockmendel