Fix index for datetime64 conversion. Fixes #13937
State: closed

- [x] closes #13937
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] 0.20.0

Fix index for datetime64 conversion

This PR fixes index for datetime64 conversion. Also,
update tests - pandas/pandas/tests/tests_convert_to.py

Fixes https://github.com/pydata/pandas/issues/13937


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/14446?src=pr&el=h1) Report
> Merging [#14446](https://codecov.io/gh/pandas-dev/pandas/pull/14446?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/29d81f3df81eb0a4d077ae1317df74d509cdc446?src=pr&el=desc) will **decrease** coverage by `-0.03%`.
> The diff coverage is `100%`.


```diff
@@            Coverage Diff             @@
##           master   #14446      +/-   ##
==========================================
- Coverage   91.06%   91.04%   -0.03%     
==========================================
  Files         136      136              
  Lines       49104    49104              
==========================================
- Hits        44718    44705      -13     
- Misses       4386     4399      +13
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/14446?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.74% <100%> (-0.1%)` | :x: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `40% <0%> (-46.67%)` | :x: |
| [pandas/util/decorators.py](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVjb3JhdG9ycy5weQ==) | `67.92% <0%> (-0.95%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `91.78% <0%> (-0.35%)` | :x: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.02% <0%> (-0.34%)` | :x: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/14446?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/14446?src=pr&el=footer). Last update [29d81f3...3806983](https://codecov.io/gh/pandas-dev/pandas/compare/29d81f3df81eb0a4d077ae1317df74d509cdc446...380698398cef0805a26b68e21f5502c6894dbf7c?src=pr&el=footer&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
@jreback Please take a look. I updated tests as you suggested in PR #14044.

pls add a whatsnew entry for 0.19.1

@amolkahat It looks like something went wrong with rebasing/updating. Normally, doing exactly the following should clean it up:

```
git fetch upstream
git checkout bug_fixes
git rebase upstream/master
git push origin bug_fixes -f
```

(supposing your fork is 'origin' and pandas-dev is 'upstream')
@amolkahat Can you rebase? (see my previous comment how to fix it)
@jorisvandenbossche Please take a look. 
can you add a whatsnew note for 0.20.0
can you update
@jreback Please take a look.
@amolkahat thanks it looks a bit better. In general, please don't modify whitespace. You must have some editor / settings which are doing things. They are pretty distracting.
you'll want to rebase on master as travis was having some issues
thanks!
@jreback Thanks.
Can you tell me on which IRC server & channel pandas-dev discussion happen?
@amolkahat for chat, there is the gitter chat (https://gitter.im/pydata/pandas), there is also the pandas-dev mailing list (https://mail.python.org/mailman/listinfo/pandas-dev), but most of the discussion happens on github
@jorisvandenbossche Thank you. 😃