BUG: Handle iterable of arrays in convert
State: closed

DatetimeConverter.convert can take an array or iterable of arrays.
Fixed the converter to detect which case we're in and then re-use
the existing logic.

Posting here for feedback from @tacaswell. Specifically,

1. Presumably our other two converters `TimeConverter` and `PeriodConverter` could suffer from the same problem?
2. `if is_list_like(values) and is_list_like(values[0]):` feels hacky... Thoughts?

xref https://github.com/matplotlib/matplotlib/issues/8459

Labels:
name: Bug
name: Visualization
description: plotting

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=h1) Report
> Merging [#16026](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/90dd3f94cf120f628c086fdd965fc82878951bd9?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16026      +/-   ##
==========================================
+ Coverage   90.99%      91%   +<.01%     
==========================================
  Files         153      153              
  Lines       50469    50481      +12     
==========================================
+ Hits        45924    45939      +15     
+ Misses       4545     4542       -3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <100%> (ø)` | :arrow_up: |
| #single | `40.43% <25%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/inference.py](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2luZmVyZW5jZS5weQ==) | `98.38% <100%> (+0.05%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.54% <100%> (+0.56%)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `80.73% <0%> (+0.18%)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16026?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.03% <0%> (+0.34%)` | :arrow_up: |

------

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

1. I would also suspect.
2. we have similar looking stuff to deal with ambiguous import from the user.  That looks reasonable to me.  Alternative is to `try...except` passing to the 1d version and then fall back to the list comprehension?
Nice solution. One slight concern though: line 184 of `_converter.py` looks a bit buggy: 
```if is_list_like(values) and is_list_like(values[0]):```
If `values == []`, it looks like `is_list_like(values[0])` will cause an error while  `is_list_like(values)` still returns `True`
@TomAugspurger Can you also add a small test for the Converter itself? https://github.com/pandas-dev/pandas/blob/master/pandas/tests/plotting/test_converter.py#L30 eg just an example with that string in a nested list


> Can you also add a small test for the Converter itself? 

Added a test for PeriodConverter and DateTimeConverter. I don't see tests for TimeConverter, so I haven't touched that code at all.