BUG: Don't overflow in DataFrame init
State: closed

For integers larger than what uint64 can handle (or smaller than what int64 can handle), we gracefully default to the object dtype instead of overflowing.

Closes #18584.

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
I assume it'll be fine, but could you do a quick performance check on ints smaller than int64 max to make sure things look OK?
> I assume it'll be fine, but could you do a quick performance check on ints smaller than int64 max to make sure things look OK?

@TomAugspurger : Didn't seen any perf degradation, which makes sense since the changes are just new `int` comparisons.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18624?src=pr&el=h1) Report
> Merging [#18624](https://codecov.io/gh/pandas-dev/pandas/pull/18624?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/52fefd50f8bffa493018ba8ff8b8c46b95c94ada?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18624      +/-   ##
==========================================
- Coverage    91.6%   91.58%   -0.02%     
==========================================
  Files         153      153              
  Lines       51253    51253              
==========================================
- Hits        46950    46941       -9     
- Misses       4303     4312       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.45% <ø> (ø)` | :arrow_up: |
| #single | `40.67% <ø> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18624?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18624/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18624/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.81% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18624?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/18624?src=pr&el=footer). Last update [52fefd5...5f5d332](https://codecov.io/gh/pandas-dev/pandas/pull/18624?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/18624?src=pr&el=h1) Report
> Merging [#18624](https://codecov.io/gh/pandas-dev/pandas/pull/18624?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c3c04e266cbc5e176cc6ef4dc385cdd88fda0669?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18624      +/-   ##
==========================================
+ Coverage   91.58%   91.58%   +<.01%     
==========================================
  Files         153      153              
  Lines       51250    51250              
==========================================
+ Hits        46935    46938       +3     
+ Misses       4315     4312       -3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.44% <ø> (+0.02%)` | :arrow_up: |
| #single | `40.67% <ø> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18624?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18624/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18624/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.81% <0%> (-0.1%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18624/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.25% <0%> (+1.81%)` | :arrow_up: |

------

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

All green.  @TomAugspurger @jreback PTAL
structure lgtm. I think @jorisvandenbossche has a comment.
@jreback @jorisvandenbossche @TomAugspurger : 

All comments have been addressed, and all is green.  PTAL.
Thanks!