BUG: reshape fix for maybe_infer_to_datetimelike()
State: closed

 - [x] closes #16362
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [ ] whatsnew entry

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

Comments:
tests should *always* be included. generally I write them *first* to ensure that they are picking up the bug. you can push to this PR itself.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=h1) Report
> Merging [#16395](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0f55de1b334131dd0577b91eb061dcb8bc65ef78?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/16395/graphs/tree.svg?token=eZ4WkYLtcO&width=650&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16395      +/-   ##
==========================================
- Coverage   90.41%    90.4%   -0.01%     
==========================================
  Files         161      161              
  Lines       50997    50997              
==========================================
- Hits        46107    46106       -1     
- Misses       4890     4891       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.24% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.19% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `86.89% <100%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.05% <0%> (-0.34%)` | :arrow_down: |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=h1) Report
> Merging [#16395](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7271f50c234faeaaac177a4e1829b7401ea252ee?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.

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

```diff
@@           Coverage Diff           @@
##           master   #16395   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         161      161           
  Lines       51033    51033           
=======================================
  Hits        46148    46148           
  Misses       4885     4885
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.26% <100%> (ø)` | :arrow_up: |
| #single | `40.17% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/16395?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `86.89% <100%> (ø)` | :arrow_up: |

------

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

@jreback I might need some guidance...I might not have needed to touch this -- the branch had a new conflict, I imagine because of other merged PRs, but only with whatsnew. Now I'm not sure how to fix it back to a state where tests pass.
pls add a whatsnew note in 0.20.2 (bug fixes, reshaping section)
Does https://github.com/pandas-dev/pandas/commit/cd11b497608d216dbd4276ddc119f52dc0588a70 look like the full set of changes, aside from the whatsnew?
It looks like you lost some changes, but you should be able to recover them with your git reflog, assuming you haven't cleared it manually. Or maybe even a `git reset --soft cd11b49`. If you ping me on gitter I can walk you through the recover steps.
@TomAugspurger thanks, didn't have much time today and thankfully this is such a small change so I just redid the changes. I did add one more test assertion this morning upon Jeff's recommendation, and that's included here as well.
thanks @RobinFiveWords