BUG: dropna() on single column timezone-aware values (#13407)
State: closed

- [x] closes #13407
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

As mentioned by the title of #13407, DataFrame.values not a 2D-array when constructed from timezone-aware datetimes. Hence, ``notna(frame.values)`` raises ``ValueErorr: 'axis' entry is out of bounds`` because user tries to apply ``dropna`` on a 1D-array.

I mainly include the example mentioned by the original author of #13407. Let me know if further test examples are required for this issue. Thanks.

Edit: I add additional test example to demonstrate the dropping of np.nan and None from the Series having timezone-ware datetimes.

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

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

```diff
@@            Coverage Diff             @@
##           master   #20422      +/-   ##
==========================================
- Coverage   91.85%   91.82%   -0.03%     
==========================================
  Files         152      152              
  Lines       49231    49232       +1     
==========================================
- Hits        45220    45209      -11     
- Misses       4011     4023      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.21% <100%> (-0.03%)` | :arrow_down: |
| #single | `41.88% <100%> (+0.04%)` | :arrow_up: |

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

------

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

Hello @JQGoh! Thanks for updating the PR.





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

##### Comment last updated on March 25, 2018 at 14:23 Hours UTC
@TomAugspurger In case this could be of your interest. I recall that my first commit passed all the CI tests. However, the current failure is related to the new change in pandas/tests/extension/json/test_json.py
Sorry about that. Fixed on master.

If you fetch master and merge it into your branch things should pass. You can also fixup that pep8 issue.
@TomAugspurger Thank you for the revisions. I have fixed the PEP8 issues as well, please help to review the changes if possible. 
@jreback Thank you for your suggestions. Done. 
thanks for the patch @JQGoh nice to have an older issue closed!