Skip to content

Commit 4a495d0

Browse files
committed
DEPR: remove legacy pd.TimeSeries class in favor of pd.Series
xref pandas-dev#10890
1 parent aa03e7f commit 4a495d0

File tree

15 files changed

+12
-29
lines changed

15 files changed

+12
-29
lines changed

doc/source/whatsnew/v0.20.0.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ Other enhancements
122122
Backwards incompatible API changes
123123
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124124

125+
.. _whatsnew.api_breaking.io_compat
126+
127+
Pickle and HDF5 compat requires >= 0.13.0
128+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129+
130+
``pd.TimeSeries`` was deprecated officially in 0.17.0, though has only been an alias since 0.13.0. It has
131+
been dropped in favor of ``pd.Series``.
132+
133+
This *may* cause pickles / HDF5 files that were created with the ``pd.TimeSeries`` to become unreadable. (:issue:``).
134+
125135
.. _whatsnew.api_breaking.index_map
126136

127137
Map on Index types now return other Index types
@@ -273,7 +283,6 @@ Removal of prior version deprecations/changes
273283

274284

275285

276-
277286
.. _whatsnew_0200.performance:
278287

279288
Performance Improvements

pandas/api/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class TestPDApi(Base, tm.TestCase):
5959
'TimedeltaIndex', 'Timestamp']
6060

6161
# these are already deprecated; awaiting removal
62-
deprecated_classes = ['TimeSeries', 'WidePanel',
62+
deprecated_classes = ['WidePanel',
6363
'SparseTimeSeries', 'Panel4D',
6464
'SparseList']
6565

pandas/core/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pandas.core.index import (Index, CategoricalIndex, Int64Index,
1313
RangeIndex, Float64Index, MultiIndex)
1414

15-
from pandas.core.series import Series, TimeSeries
15+
from pandas.core.series import Series
1616
from pandas.core.frame import DataFrame
1717
from pandas.core.panel import Panel, WidePanel
1818
from pandas.core.panel4d import Panel4D

pandas/core/series.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,15 +2980,6 @@ def create_from_value(value, index, dtype):
29802980
return subarr
29812981

29822982

2983-
# backwards compatiblity
2984-
class TimeSeries(Series):
2985-
def __init__(self, *args, **kwargs):
2986-
# deprecation TimeSeries, #10890
2987-
warnings.warn("TimeSeries is deprecated. Please use Series",
2988-
FutureWarning, stacklevel=2)
2989-
2990-
super(TimeSeries, self).__init__(*args, **kwargs)
2991-
29922983
# ----------------------------------------------------------------------
29932984
# Add plotting methods to Series
29942985

pandas/io/pytables.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ class DuplicateWarning(Warning):
164164

165165
Series: u('series'),
166166
SparseSeries: u('sparse_series'),
167-
pd.TimeSeries: u('series'),
168167
DataFrame: u('frame'),
169168
SparseDataFrame: u('sparse_frame'),
170169
Panel: u('wide'),
@@ -173,7 +172,6 @@ class DuplicateWarning(Warning):
173172

174173
# storer class map
175174
_STORER_MAP = {
176-
u('TimeSeries'): 'LegacySeriesFixed',
177175
u('Series'): 'LegacySeriesFixed',
178176
u('DataFrame'): 'LegacyFrameFixed',
179177
u('DataMatrix'): 'LegacyFrameFixed',
-14.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)