BUG: Series.get() with ExtensionArray and integer index
State: closed

- [x] closes #21257
- [x] tests added / passed
    - added example in tests/extension/base/getitem.py:test_get()
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
    - Put this in 0.23.1 for now



Labels:
name: Bug
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21260?src=pr&el=h1) Report
> Merging [#21260](https://codecov.io/gh/pandas-dev/pandas/pull/21260?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0801b8c9090752c1342962aecd03e9a0468adbd4?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #21260      +/-   ##
==========================================
+ Coverage    91.9%   91.92%   +0.02%     
==========================================
  Files         154      153       -1     
  Lines       49557    49572      +15     
==========================================
+ Hits        45544    45568      +24     
+ Misses       4013     4004       -9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <100%> (+0.04%)` | :arrow_up: |
| #single | `41.8% <0%> (-0.22%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21260?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.63% <100%> (ø)` | :arrow_up: |
| [pandas/io/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2NvbW1vbi5weQ==) | `70.28% <0%> (-0.93%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.22% <0%> (-0.27%)` | :arrow_down: |
| [pandas/util/\_test\_decorators.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX3Rlc3RfZGVjb3JhdG9ycy5weQ==) | `92.5% <0%> (-0.19%)` | :arrow_down: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.55% <0%> (-0.18%)` | :arrow_down: |
| [pandas/compat/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9fX2luaXRfXy5weQ==) | `58.43% <0%> (-0.18%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.12% <0%> (-0.09%)` | :arrow_down: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.43% <0%> (-0.05%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.17% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.83% <0%> (-0.02%)` | :arrow_down: |
| ... and [19 more](https://codecov.io/gh/pandas-dev/pandas/pull/21260/diff?src=pr&el=tree-more) | |

------

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

@jorisvandenbossche I added tests for `.get` a variety of `Series` types in this last commit, which includes datetimetz ones.  category was already handled by `pandas/tests/extension/category/test_categorical.py` which picks up the base test in `pandas/tests/extension/base/getitem.py`
@Dr-Irv this looks good. just rebased. ping on green here.
thanks!