BUG: DatetimeIndex(tz) & single column name, return empty df (GH19157)
State: closed

- [x] closes #19157 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This issue is due to self._init_dict({0: values}, index, columns, dtype=dtype) will call for the filtering if columns passed (`data = {k: v for k, v in compat.iteritems(data) if k in columns}`), see function ``_init_dict`` of [frame.py](https://github.com/pandas-dev/pandas/blob/master/pandas/core/frame.py) 

So `self._init_dict({0: values}, index, columns, dtype=dtype)` expects the column name of values as '0', but since we pass a column with a different name, upon filtering it will result in an empty DataFrame. 

My solution assumes that the conversion of a series of DatetimeIndex with tz_info. Hence, we will initialize a DataFrame according to the given column name. If no column name specified, index '0' is chosen. I introduced an assertion to warn the users if multiple column names are passed.

Update 27-01-2018: The updated PR includes a test, and update on whatsnew entry. The revised solution uses ``_arrays_to_mgr`` instead, such that a default column name 0 is specified if ``columns`` not specified.

Labels:
name: Datetime
description: Datetime data dtype
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Timezones
description: Timezone data dtype

Comments:
you can add tests for #13407 as well (if this fixes it).
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19330?src=pr&el=h1) Report
> Merging [#19330](https://codecov.io/gh/pandas-dev/pandas/pull/19330?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5f6c80b5e3641ab96f747bd9967e4d58b5852814?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #19330      +/-   ##
==========================================
- Coverage   91.65%   91.63%   -0.03%     
==========================================
  Files         150      150              
  Lines       48724    48726       +2     
==========================================
- Hits        44658    44648      -10     
- Misses       4066     4078      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90% <100%> (-0.03%)` | :arrow_down: |
| #single | `41.74% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19330?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/19330/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.62% <100%> (ø)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19330/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |

------

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

@jreback Thank you for your suggestion, I have revised the changes accordingly, including an addition of test case and whatsnew entry note.

However, this does not solve the issue #13407 yet. 
thanks @JQGoh!

happy to take a PR for #13407 !