DOC: Fix DataFrame.to_xarray doctests and allow the CI to run it.
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Fix the docstring for DataFrame.to_xarray as described in #22459 . I removed the pandas.panel example since it was deprecated and I replaced it with a MultiIndex.
Hello @Moisan! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/generic.py`](https://github.com/Moisan/pandas/blob/08561d2b0890e8d4e33de779e88412599a695457/pandas/core/generic.py) !



##### Comment last updated on September 14, 2018 at 20:39 Hours UTC # [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=h1) Report
> Merging [#22673](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/73dd6ece3b66008eb8077098c101d0e300b1e714?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #22673   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50708    50708           
=======================================
  Hits        46740    46740           
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (ø)` | :arrow_up: |
| #single | `42.35% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22673?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22673/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.67% <ø> (ø)` | :arrow_up: |

------

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