Added FrozenList subtraction
State: closed

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


Labels:
name: Enhancement
name: API Design

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


```diff
@@            Coverage Diff             @@
##           master   #15506      +/-   ##
==========================================
- Coverage   91.06%   91.04%   -0.03%     
==========================================
  Files         136      136              
  Lines       49099    49182      +83     
==========================================
+ Hits        44714    44779      +65     
- Misses       4385     4403      +18
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15506?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/indexes/frozen.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvZnJvemVuLnB5) | `93.24% <100%> (-0.31%)` | :x: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `40% <0%> (-46.67%)` | :x: |
| [pandas/util/decorators.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVjb3JhdG9ycy5weQ==) | `67.27% <0%> (-1.96%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `91.78% <0%> (-0.35%)` | :x: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.87% <0%> (-0.19%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.74% <0%> (-0.1%)` | :x: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.48% <0%> (ø)` | :white_check_mark: |
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `96.92% <0%> (+0.01%)` | :white_check_mark: |
| [pandas/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?src=pr&el=tree#diff-cGFuZGFzL2Zvcm1hdHMvc3R5bGUucHk=) | `96.8% <0%> (+0.63%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15506?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/15506?src=pr&el=footer). Last update [2340fb8...428a1b3](https://codecov.io/gh/pandas-dev/pandas/compare/2340fb8b97a3f65ce4f630075849e42fb256e3be...428a1b33f5a48bce94dccebb47949193610a749d?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
I want to raise some concern regarding adding this feature (without wanting to dismiss your effort @bthayer2365 !). I think we should think about this some more. 

Adding this would introduce a discrepancy between index level names and column names, while we actually try to lessen the gap (eg by being able to specify an index level name in places where you can specify a column name). This is actually a feature we *removed* from column names, in favor of the `difference` method. 
So that is maybe also an alternative? Putting this in a method instead of overloading subtraction? (although I certainly agree what we try to obtain here is useful, and as a method it is more verbose)


no conceptual problem with making these real setops, e.g. ``.union``, ``.difference`` as @jorisvandenbossche suggests. Publicly these are *only* used for names of levels anyhow.
Would you like me to change `__add__` to `union` as well?
yes; u will have to deprecate the add though 
To do that, do I just decorate it with `@deprecated`, or is there more?
that should work (and add in whatsnew as well)
iadd too
I tried resolving the conflicts and merging manually, but the check failed, so I reverted back to before I resolved the conflict. Am I supposed to resolve the merge conflicts and merge master?
@bthayer2365 Yep, you need to resolve conflicts on your local branch. You should do:

```
git pull upstream master --rebase --tags
```
And resolve the conflicts one by one, doing `git rebase --continue` once each one has been resolved. Then push to your fork.
yes the idea is to rebase on master. But don't worry about that as much as passing tests (of course I think travis / amazon is having issues atm).
Okay, should we just wait a bit to see if the tests work when everything
starts working again? Everything worked on the command line

On Feb 28, 2017 7:59 PM, "Jeff Reback" <notifications@github.com> wrote:

> yes the idea is to rebase on master. But don't worry about that as much as
> passing tests (of course I think travis / amazon is having issues atm).
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/15506#issuecomment-283221620>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AF0RY4QdddVNhcFqKprMdBJcVTc45us2ks5rhNEegaJpZM4MMIo2>
> .
>

I'll leave it like this and see if it passes
you'll want to rebase on master as travis was having some issues
Anything else? All tests passed 👍 
thanks @bthayer2365 
@bthayer2365 Great job! Thanks for your contribution.
Glad I could help!