[ENH] Use default EA repr for IntervalArray
State: closed

- [x] closes #25022
- [x] 1 test deleted
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Interval
description: Interval data type
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26316?src=pr&el=h1) Report
> Merging [#26316](https://codecov.io/gh/pandas-dev/pandas/pull/26316?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/23b611533a3f66eb42db23b8532adb7a14f23df2?src=pr&el=desc) will **decrease** coverage by `51.3%`.
> The diff coverage is `n/a`.

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

```diff
@@             Coverage Diff             @@
##           master   #26316       +/-   ##
===========================================
- Coverage   92.04%   40.74%   -51.31%     
===========================================
  Files         175      175               
  Lines       52291    52291               
===========================================
- Hits        48132    21306    -26826     
- Misses       4159    30985    +26826
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `?` | |
| #single | `40.74% <ø> (-0.15%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26316?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2ludGVydmFsLnB5) | `38.15% <ø> (-54.92%)` | :arrow_down: |
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `35.33% <ø> (-59.9%)` | :arrow_down: |
| [pandas/io/formats/latex.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvbGF0ZXgucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/sas/sas\_constants.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfY29uc3RhbnRzLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/core/groupby/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9jYXRlZ29yaWNhbC5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/plotting.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvcGxvdHRpbmcucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvY29udmVydGVyLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `0% <0%> (-99.37%)` | :arrow_down: |
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `0% <0%> (-91.16%)` | :arrow_down: |
| [pandas/io/sas/sas\_xport.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfeHBvcnQucHk=) | `0% <0%> (-90.1%)` | :arrow_down: |
| ... and [132 more](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26316?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/26316?src=pr&el=footer). Last update [23b6115...95c012a](https://codecov.io/gh/pandas-dev/pandas/pull/26316?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/26316?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@be4b48e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #26316   +/-   ##
=========================================
  Coverage          ?   91.97%           
=========================================
  Files             ?      180           
  Lines             ?    50774           
  Branches          ?        0           
=========================================
  Hits              ?    46701           
  Misses            ?     4073           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (?)` | |
| #single | `41.83% <100%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26316?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2ludGVydmFsLnB5) | `92.19% <100%> (ø)` | |
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/26316/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `95.95% <100%> (ø)` | |

------

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

I'm not sure we need / want to make this change.
Also not sure if we need/want this change, as it adds an additional layer of complexity to maintaining common docstrings.  Certainly something we could work around if we want to change the repr but not ideal.

cc @jorisvandenbossche : what are your thoughts here?
Personally I think *in principle* it would be nice to start using the same repr style for all Array classes. 
But the docstring sharing is indeed something we first need to think through. 
How do we currently do that for DatetimeArray? We don't share docstrings with DatetimeIndex?
@TomAugspurger what is your objection here? this de-special cases IntervalArray repr and makes it like all other Arrays, a good thing.
Having to rewrite the docstrings to pass doctests. 

> On May 11, 2019, at 14:16, Jeff Reback <notifications@github.com> wrote:
> 
> @TomAugspurger what is your objection here? this de-special cases IntervalArray repr and makes it like all other Arrays, a good thing.
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.

@makbigc can you merge master. 
working. Give me some more time.
@​jschendel Amended. Please tell me if anything is wrong.
ok this looks pretty good now; @jschendel 
Will review this in more depth later tonight but looks good overall.  Would be nice to have an automated way of converting between `IntervalArray` and `IntervalIndex` example sections but that can be saved for a follow up.
@WillAyd @jschendel Anything else?
thanks @makbigc!