Add __copy__ and __deepcopy__ to NDFrame
State: closed

 - [ ] closes #15370 
 - [ ] tests added / passed
 - [ ] passes ``git diff upstream/master | flake8 --diff``
 - [ ] whatsnew entry


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Unrelated to this PR, I've noticed several other places where there are assignment method aliases in base classes, eg, [`Index.__bool__`](https://github.com/pandas-dev/pandas/blob/master/pandas/indexes/base.py#L1493).  I'm not interested in fixing that in this PR, but maybe someone else ought to take a look down the road.
@bmcfee if you want to make an issue would be great for other things
I made the requested changes.  At this point, it looks like there are a bunch of test failures that have nothing to do with this PR.  Should I assume master is in a not-very-good state right now?
not sure what you mean?

master has been all green for a while
@jreback appveyor had one build fail to install (?!); travis has one build failing on a panel4d setitem test, but only one of the builds.

FWIW, I had an appveyor / conda install fail (checksum mismatch) on a separate project this morning, and restarting the build fixed it.  Maybe there's just something screwy in conda land today.
no your change causes this to fail
> no your change causes this to fail

Really?  Nothing in [the log](https://ci.appveyor.com/project/jreback/pandas-465/build/1.0.4006/job/i1xtrma5hb2m66u6) indicates as such:
```
installing requirements from ci\requirements-2.7-64.run - done"
conda install -n pandas (conda build ci\appveyor.recipe -q --output)
conda : Error: no such directory: C:\projects\pandas-465\ci\appveyor.recipe
At line:1 char:26
+ conda install -n pandas (conda build ci\appveyor.recipe -q --output)
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: no such ...appveyor.recipe:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
conda : 
At line:1 char:1
+ conda install -n pandas (conda build ci\appveyor.recipe -q --output)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
CondaValueError: Value error: too few arguments, must supply command line package specs or --file
Command executed with exception: 
CondaValueError: Value error: too few arguments, must supply command line package specs or --file
```
look on travis
appveyor is just for confirmation builds
they are behind and i has to cancel a few
> look on travis

Okay, I'm looking, and I don't understand anything about what's going on here, or what's different between the run where it passes (eg [here](https://travis-ci.org/pandas-dev/pandas/jobs/202958347)) and the one where it fails (eg, [here](https://travis-ci.org/pandas-dev/pandas/jobs/202958348)). Since the test log doesn't provide much useful diagnostic information, maybe you can help explain what the difference is so I'm not just stumbling in the dark?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15444?src=pr&el=h1) Report
> Merging [#15444](https://codecov.io/gh/pandas-dev/pandas/pull/15444?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/12f2c6a101cf866527df5dac4184a8803792fd78?src=pr&el=desc) will **decrease** coverage by `-0.01%`.
> The diff coverage is `83.33%`.


```diff
@@            Coverage Diff             @@
##           master   #15444      +/-   ##
==========================================
- Coverage   90.37%   90.36%   -0.01%     
==========================================
  Files         135      135              
  Lines       49466    49473       +7     
==========================================
+ Hits        44705    44707       +2     
- Misses       4761     4766       +5
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15444?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.29% <83.33%> (-0.05%)` | :x: |
| [pandas/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvYmFzZS5weQ==) | `96.24% <83.33%> (ø)` | :white_check_mark: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.02% <ø> (-0.34%)` | :x: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.91% <ø> (-0.19%)` | :x: |
| [pandas/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvbXVsdGkucHk=) | `96.65% <ø> (-0.09%)` | :x: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15444?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/15444?src=pr&el=footer). Last update [12f2c6a...bf36f35](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bf36f352bdc3dd83dab86b1d55607a68321ea0d1?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
@bmcfee I rebased and added a commit. hopefully this should pass.

the issue is that ``test_generic.py`` runs tests on Panel4D (which we are deprecating), and it is testing on that, so the addtl _consturct shows a warning, and later tests thus fail. easy enough just to skip that particular test.
@jreback Thanks!
This guy's green now -- what's next?
thanks for the patience @bmcfee