API/REGR: Convert to float for index union
State: closed

This restores the 0.24.x behavior of Index.union(other) between
Float and (U)Int indexes. These are again floating dtype.

left  | right | output of left.union(right)
----- | ----- | ------
int   |float  | float64
int   |uint   | object
float | uint  | float64

https://github.com/pandas-dev/pandas/issues/26778#issuecomment-505108465

Closes https://github.com/pandas-dev/pandas/issues/26778


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Index
description: Related to the Index class or subclasses

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

```diff
@@            Coverage Diff             @@
##           master   #27034      +/-   ##
==========================================
- Coverage   91.99%   91.99%   -0.01%     
==========================================
  Files         180      180              
  Lines       50774    50799      +25     
==========================================
+ Hits        46711    46733      +22     
- Misses       4063     4066       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.63% <100%> (ø)` | :arrow_up: |
| #single | `41.85% <46.15%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/27034?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9udW1lcmljLnB5) | `97.6% <100%> (+0.26%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.94% <0%> (+0.1%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/27034?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/27034?src=pr&el=footer). Last update [8ea2d08...134a547](https://codecov.io/gh/pandas-dev/pandas/pull/27034?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/27034?src=pr&el=h1) Report
> Merging [#27034](https://codecov.io/gh/pandas-dev/pandas/pull/27034?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e9555159afd8caabc88b45ca6c06a16efe2f6afc?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #27034      +/-   ##
==========================================
- Coverage   92.04%      92%   -0.04%     
==========================================
  Files         180      180              
  Lines       50714    50765      +51     
==========================================
+ Hits        46679    46706      +27     
- Misses       4035     4059      +24
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.64% <100%> (-0.04%)` | :arrow_down: |
| #single | `41.83% <58.33%> (-0.13%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/27034?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9udW1lcmljLnB5) | `97.46% <100%> (+0.12%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/internals/managers.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL21hbmFnZXJzLnB5) | `96.09% <0%> (-0.77%)` | :arrow_down: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.61% <0%> (-0.53%)` | :arrow_down: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `17.61% <0%> (-0.2%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.94% <0%> (+0.1%)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/27034/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.48% <0%> (+0.18%)` | :arrow_up: |

------

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

> looks good. can you add a sub-section in whatsnew to explain the change.

This is restoring the 0.24.2 behavior. I added a note in the user guide docs.
> > looks good. can you add a sub-section in whatsnew to explain the change.
> 
> This is restoring the 0.24.2 behavior. I added a note in the user guide docs.

That may be, but this should be up front about that in the whatsnew. IOW should be highly visible.
The CI failure from codecov is unrelated I think (cc @mroeschke. May just be a hiccup)
thanks @TomAugspurger