Include MultiIndex slice in non-reducing slices
State: closed

Changes behaviour of user-passed IndexSlice to return DataFrame instead of
reducing to Series.  MultiIndex slices are tuples so this explicitly checks type
and guards with braces.

This seems deceptively simple.  WDYT?

- [x] closes #19861
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap
name: MultiIndex

Comments:
also pls add a whatsnew note (bug fix, multiindex is ok)
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19881?src=pr&el=h1) Report
> Merging [#19881](https://codecov.io/gh/pandas-dev/pandas/pull/19881?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/cf922304a16b1d4539b841f56ab2a83496a80384?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/19881/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/19881?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19881      +/-   ##
==========================================
- Coverage   92.32%   92.32%   -0.01%     
==========================================
  Files         166      166              
  Lines       52440    52429      -11     
==========================================
- Hits        48417    48404      -13     
- Misses       4023     4025       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.74% <100%> (-0.01%)` | :arrow_down: |
| #single | `43.01% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19881?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19881/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.87% <100%> (ø)` | :arrow_up: |
| [pandas/core/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19881/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbWlzc2luZy5weQ==) | `91.7% <0%> (-0.6%)` | :arrow_down: |
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/19881/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `96.44% <0%> (-0.17%)` | :arrow_down: |
| [pandas/core/arrays/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/19881/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3BlcmlvZC5weQ==) | `98.59% <0%> (+0.06%)` | :arrow_up: |

------

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

Thanks for review, changed as requested, but still two minor questions for clarification ([comment](https://github.com/pandas-dev/pandas/pull/19881/files/561da9f50172d11efdf0ff1da0dbbb4a5f7b9461#r170427081))
this got a bit lost. can you rebase and move the note to 0.24.0
Hello @fleimgruber! Thanks for updating the PR.







Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on January 02, 2019 at 00:28 Hours UTC
Rebased and whatsnew 0.24.0.
@fleimgruber mind rebasing and resolving the conflicts above. ( The build issues on azure you are seeing is resolved on master )  
@alimcmaster1 rebased. Which conflicts were you referring to? Still failing on Azure - a new bug?
@fleimgruber thanks ( you have resolved the conflicts now ). It appears to be a flakey test, i've raised a PR here #23849 to hopefully fix the problem
@jreback @gfyoung @mroeschke does someone mind restarting the azure 27 build on this PR - seems to be a flakey test. Im look in #23849 
pls merge master
Rebased on master.
@fleimgruber can you update for comments
thanks @fleimgruber