DEPR: remove pd.TimeSeries & Series.is_time_series
State: closed

xref #10890 

Labels:
name: Deprecate
description: Functionality to remove in pandas

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


```diff
@@            Coverage Diff             @@
##           master   #15098      +/-   ##
==========================================
+ Coverage   90.36%   91.04%   +0.67%     
==========================================
  Files         136      136              
  Lines       49552    49091     -461     
==========================================
- Hits        44780    44694      -86     
+ Misses       4772     4397     -375
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15098?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/compat/pickle_compat.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9waWNrbGVfY29tcGF0LnB5) | `68.29% <ø> (ø)` | :white_check_mark: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `93.05% <ø> (-0.86%)` | :x: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.93% <ø> (-0.04%)` | :x: |
| [pandas/core/api.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXBpLnB5) | `100% <100%> (ø)` | :white_check_mark: |
| [pandas/util/decorators.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVjb3JhdG9ycy5weQ==) | `67.32% <0%> (-1.28%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.73% <0%> (-0.1%)` | :x: |
| [pandas/util/print_versions.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvcHJpbnRfdmVyc2lvbnMucHk=) | `15.71% <0%> (ø)` | :white_check_mark: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `95% <0%> (+0.01%)` | :white_check_mark: |
| [pandas/types/cast.py](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=tree#diff-cGFuZGFzL3R5cGVzL2Nhc3QucHk=) | `85.65% <0%> (+0.2%)` | :white_check_mark: |
| ... and [1 more](https://codecov.io/gh/pandas-dev/pandas/pull/15098?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15098?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/15098?src=pr&el=footer). Last update [e15de4d...d9101bc](https://codecov.io/gh/pandas-dev/pandas/compare/e15de4d484dbff8f941c9d5cc31869d503d9c020...d9101bcbe56d67adcd758fa38775e3177fb564ef?src=pr&el=footer&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Hmm, the `statsmodels` import is crashing on this .. 
https://travis-ci.org/pandas-dev/pandas/jobs/190645844

And seems this is already fixed on master (https://github.com/statsmodels/statsmodels/pull/2807), but AFAIK not yet in a released version of statsmodels.
@jorisvandenbossche on statsmodels. hmm, I think 0.8.0 will be out before we release 0.20.0, so this is mitigated. But this has been deprecated for quite a long time (and they haven't done releases in a while).

cc @josef-pkt

0.17 was released in October 2015, and they removed it in Feb 2016, so they were not that much behind :-) 
It's indeed just a problem they didn't have a release for some time, but the problem is also that, although we think/hope it will be, we are not 100% *sure* statsmodels 0.8 will be released before pandas 0.20
@jorisvandenbossche 
The PR is certainly fine for me, but I think merging now is possibly a bit problematic. As all users of pandas master that also use statsmodels (or eg seaborn which uses statsmodels for certain functionality) will get import errors. Not sure how many people it would impact though. 
Maybe wait until a reaction of statsmodels on their envisioned timeline for a release?
@jorisvandenbossche that's fair, will leave it for now then.
ok, seems statsmodels 0.8.0 is out (I put our 2.7 build on it via pip install).

So this all checks out and everything runs with this PR (of course deprecation warnings for ``.ix``, but that is another matter).

@jorisvandenbossche any more comments here?
Just to come back on the legacy pickles you removed. I tried to read those with this branch, and only half of them contain a TimeSeries (and thus fail, it are the 0.12 ones and the 0.11.0_x86_64_linux_3.3.0.pickle one). 
Shouldn't we just keep the other ones as tests until we have a more pressing issue to declare we don't read in pickles < 0.13 ? They are currently working, so I don't see a reason to remove them
@jorisvandenbossche 

used my new renaming feature in pickle_compat :>

https://github.com/pandas-dev/pandas/pull/15098/commits/87804b4cca0082cc8997902ca4c3038bbf93943d

so these are read/converted just fine. Still I think we should 'drop' compat with < 0.13 anyhow. Its about time.
That also means that the whatsnew notice can be largely (the part on pickle compat) removed?
Let's have a separate issue about pickle compat. I don't really object dropping older versions, but as long it is not that much of effort to keep it (but I don't know how much effort you have to do in other cases to keep the compat), and we have tests that are passing, I also don't see a strong reason to drop it.
@jorisvandenbossche yes, though I am +1 on *saying* we are no longer < 0.13 compat :)
and this works for pickle. It *doesn't* for HDF5 (yes again *may* be able to fix it, but that's harder).
>  though I am +1 on saying we are no longer < 0.13 compat :)

OK, but that should not be tied to TimeSeries depr (in the whatsnew explanation)
see my prior (so I will revert on the pickle compat in whatsnew).
Yep, just saw it, fine!
ok, lmk if you have any other comments. will merge on green.