Fix to_csv of DataFrame with single level multiindex.
State: closed

### What's this PR do?
Fixes the output of to_csv to show the value instead of the tuple when a ``DataFrame`` or ``Series`` is constructed using a ``MultiIndex`` with one level.  Although, I'm not sure if it's more desirable to require a MultiIndex to be instantiated with more than one level in the future. 

- [X] closes #19589
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry


Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: IO CSV
description: read_csv, to_csv
name: MultiIndex

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19831?src=pr&el=h1) Report
> Merging [#19831](https://codecov.io/gh/pandas-dev/pandas/pull/19831?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/de39bfc5e5c6483cb2669773fa10ddc2e32ca111?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/19831/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/19831?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19831      +/-   ##
==========================================
- Coverage   92.21%   92.21%   -0.01%     
==========================================
  Files         161      161              
  Lines       51173    51176       +3     
==========================================
+ Hits        47190    47192       +2     
- Misses       3983     3984       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.64% <100%> (-0.01%)` | :arrow_down: |
| #single | `42.23% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19831?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `95.38% <100%> (-0.08%)` | :arrow_down: |
| [pandas/core/dtypes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Jhc2UucHk=) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `93.1% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/inference.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2luZmVyZW5jZS5weQ==) | `98.38% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/dtypes.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2R0eXBlcy5weQ==) | `95.61% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbW1vbi5weQ==) | `94.37% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.92% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/19831/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbmNhdC5weQ==) | `96.34% <0%> (ø)` | :arrow_up: |

------

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

Fixed the merge conflict, and the whatsnew note.

Ping on green.
Hello @EricChea! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/indexes/multi.py`](https://github.com/EricChea/pandas/blob/2dd3a1bddf36a6a093332ec948fc595b6fbf865c/pandas/core/indexes/multi.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/formats/test_to_csv.py`](https://github.com/EricChea/pandas/blob/2dd3a1bddf36a6a093332ec948fc595b6fbf865c/pandas/tests/io/formats/test_to_csv.py) !


@jreback @TomAugspurger : Addressed all comments.  Everything is green except for the fact that `hypothesis` is timing out on an unrelated test:

https://travis-ci.org/pandas-dev/pandas/jobs/448750638#L2895
i thought the hypothesis stuff was fixed for timeout
can we do a precursor PR to address this?
> i thought the hypothesis stuff was fixed for timeout

I'm pretty sure it was fixed but not sure why it's complaining:

https://github.com/pandas-dev/pandas/blob/da9e35883b28c83fcf55635f73c65bef89902f21/pandas/conftest.py#L14

cc @Zac-HD 
@jreback @TomAugspurger : Everything is green now.  Maybe Travis was just acting up.  PTAL.
Gah, it's *warning* about the not-yet-enforced [`deadline` setting](https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.deadline), which `-Werror` is turning into an error.  This is almost certainly just due to a slow VM on Travis, but if you want I can open a PR to fix that this evening :disappointed:
> This is almost certainly just due to a slow VM on Travis

@Zac-HD : Indeed, that is what I suspect as well.  If you could open a PR to make our tests more robust against this, that would be great!
thanks @EricChea , @Zac-HD , and @gfyoung