Skip to content

Commit 9b33228

Browse files
committed
better docs
1 parent bff72b0 commit 9b33228

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

doc/source/whatsnew/v0.20.0.txt

+30-2
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,37 @@ Pickle and HDF5 compat requires >= 0.13.0
128128
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129129

130130
``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``.
131+
been dropped in favor of ``pd.Series``. (:issue:``15098).
132+
133+
This *may* cause pickles / HDF5 files that were created in prior versions to become unreadable if ``pd.TimeSeries``
134+
was used. If you find yourself in this situation. You can use a recent prior version of pandas to read in
135+
your pickle / HDF5 files, then write them out again after applying the procedure below.
136+
137+
.. code-block:: ipython
138+
139+
In [2]: s = pd.TimeSeries([1,2,3], index=pd.date_range('20130101', periods=3))
140+
In [3]: s
141+
Out[3]:
142+
2013-01-01 1
143+
2013-01-02 2
144+
2013-01-03 3
145+
Freq: D, dtype: int64
146+
147+
In [4]: type(s)
148+
Out[4]: pandas.core.series.TimeSeries
149+
150+
In [5]: s = pd.Series(s)
151+
152+
In [6]: s
153+
Out[6]:
154+
2013-01-01 1
155+
2013-01-02 2
156+
2013-01-03 3
157+
Freq: D, dtype: int64
158+
159+
In [7]: type(s)
160+
Out[7]: pandas.core.series.Series
132161

133-
This *may* cause pickles / HDF5 files that were created with the ``pd.TimeSeries`` to become unreadable. (:issue:``15098).
134162

135163
.. _whatsnew.api_breaking.index_map
136164

0 commit comments

Comments
 (0)