BUG: Error when specifying int index containing NaN
State: closed

Finally got around to patching this.  Partially addresses #15187.

Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
looks good. maybe some test cases for the fail conditions that you are now catching?
> maybe some test cases for the fail conditions that you are now catching?

Ah, good catch.  I thought I had added some.  Will do.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15616?src=pr&el=h1) Report
> Merging [#15616](https://codecov.io/gh/pandas-dev/pandas/pull/15616?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5667a3ad0489815c1239cba785300952c9799000?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.


```diff
@@            Coverage Diff             @@
##           master   #15616      +/-   ##
==========================================
- Coverage   91.02%      91%   -0.02%     
==========================================
  Files         143      143              
  Lines       49324    49334      +10     
==========================================
  Hits        44897    44897              
- Misses       4427     4437      +10
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15616?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvYmFzZS5weQ==) | `96.24% <100%> (+0.02%)` | :white_check_mark: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `91.76% <0%> (-0.35%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.87% <0%> (-0.1%)` | :x: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.3% <0%> (+0.33%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15616?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/15616?src=pr&el=footer). Last update [5667a3a...195b830](https://codecov.io/gh/pandas-dev/pandas/compare/5667a3ad0489815c1239cba785300952c9799000...195b8304ee3698ba8f15acee139e74001137bd63?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
@jreback : Added tests, and everything is green.
thanks!