POC: _eadata
State: closed

With _index_data figured out, it is now feasible to implement the DTA/TDA inheritance->composition changeover independently of all of the rest of #24024.  This PR is a proof of concept for what that would look like.  The steps would be roughly:

1) Instead of dispatching to `self._data`, we temporarily implement `_eadata` and dispatch to that
2) Stop mixing DatetimeLikeArrayMixin into DatetimeIndexOpsMixin
3) Stop mixing TimedeltaArrayMixin into TimedeltaIndex
4) Stop mixing DatetimeArrayMixin into DatetimeIndex

For demonstration purposes this PR implements step 1.  I have local (test-passing) branches for each of the other steps.

Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Hello @jbrockmendel! Thanks for updating the PR.











Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on December 27, 2018 at 22:48 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24394?src=pr&el=h1) Report
> Merging [#24394](https://codecov.io/gh/pandas-dev/pandas/pull/24394?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/3e0358d869f8a76b3223e8bb313a92edbaa369db?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `94.73%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24394      +/-   ##
==========================================
- Coverage    92.3%   92.29%   -0.01%     
==========================================
  Files         162      162              
  Lines       51875    51856      -19     
==========================================
- Hits        47883    47861      -22     
- Misses       3992     3995       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.7% <94.73%> (-0.01%)` | :arrow_down: |
| #single | `43% <60.52%> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24394?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `92.79% <100%> (-0.33%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `96.32% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `97.4% <100%> (+0.11%)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `90.14% <75%> (-0.31%)` | :arrow_down: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `96.69% <0%> (-0.26%)` | :arrow_down: |
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `96.29% <0%> (-0.22%)` | :arrow_down: |
| [pandas/core/arrays/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YXMucHk=) | `87.38% <0%> (+0.22%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24394?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/24394?src=pr&el=footer). Last update [3e0358d...de5430d](https://codecov.io/gh/pandas-dev/pandas/pull/24394?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/24394?src=pr&el=h1) Report
> Merging [#24394](https://codecov.io/gh/pandas-dev/pandas/pull/24394?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/3086e0a170934d87b01fa910f371002a55fd07b9?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `94.73%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24394      +/-   ##
==========================================
- Coverage   92.31%    92.3%   -0.02%     
==========================================
  Files         163      163              
  Lines       51987    51969      -18     
==========================================
- Hits        47990    47968      -22     
- Misses       3997     4001       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.7% <94.73%> (-0.02%)` | :arrow_down: |
| #single | `43.01% <60.52%> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24394?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `92.75% <100%> (-0.33%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `96.31% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `97.7% <100%> (+0.11%)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `90.11% <75%> (-0.31%)` | :arrow_down: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `96.69% <0%> (-0.26%)` | :arrow_down: |
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24394/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `95.93% <0%> (-0.22%)` | :arrow_down: |

------

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

So just naively changing the two properties to cache_readonly doesn't break any tests locally, but I'm still not comfortable with it, would rather hold off 
If this and/or #24405 is a route we want to take, I can get a start on implementing another handful of methods from 24024
if this is temporary, then ok, though why can't you simply use ``_data``?
> if this is temporary, then ok, though why can't you simply use _data?

Because `_data` is still an ndarray like in the status quo.  The point of using _eadata is to let us separate the (DTA/TDA/DTI/TDI)-internal changes of #24024 from the external changes.  
I think we should merge this, then I can put together a PR breaking `repeat`, `searchsorted`, `fillna`, `setitem` off from #24024 while the `astype` issues get resolved in #24405.
looks good. rebase just to be sure.
thanks!