Skip to content

Commit

Permalink
Add tests and whatsnew.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam3851 committed Mar 2, 2018
1 parent ae8665c commit 84e3978
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.23.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ I/O
- :class:`Interval` now supported in :func:`DataFrame.to_excel` for all Excel file types (:issue:`19242`)
- :class:`Timedelta` now supported in :func:`DataFrame.to_excel` for all Excel file types (:issue:`19242`, :issue:`9155`, :issue:`19900`)
- Bug in :meth:`pandas.io.stata.StataReader.value_labels` raising an ``AttributeError`` when called on very old files. Now returns an empty dict (:issue:`19417`)
- Bug in :func:`read_pickle` when unpickling objects with :class:`TimedeltaIndex` or :class:`Float64Index` created with pandas prior to version 0.20 (:issue:`19939`)

Plotting
^^^^^^^^
Expand Down
Binary file not shown.
Binary file not shown.
16 changes: 14 additions & 2 deletions pandas/tests/io/generate_legacy_storage_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from pandas import (Series, DataFrame, Panel,
SparseSeries, SparseDataFrame,
Index, MultiIndex, bdate_range, to_msgpack,
date_range, period_range,
date_range, period_range, timedelta_range,
Timestamp, NaT, Categorical, Period)
from pandas.tseries.offsets import (
DateOffset, Hour, Minute, Day,
Expand Down Expand Up @@ -116,7 +116,17 @@ def create_data():

index = dict(int=Index(np.arange(10)),
date=date_range('20130101', periods=10),
period=period_range('2013-01-01', freq='M', periods=10))
period=period_range('2013-01-01', freq='M', periods=10),
float=Index(np.arange(10, dtype=np.float64)),
uint=Index(np.arange(10, dtype=np.uint64)),
timedelta=timedelta_range('00:00:00', freq='30T', periods=10))

if _loose_version >= LooseVersion('0.18'):
from pandas import RangeIndex
index['range'] = RangeIndex(10)
if _loose_version >= '0.21':
from pandas import interval_range
index['interval'] = interval_range(0, periods=10)

mi = dict(reg2=MultiIndex.from_tuples(
tuple(zip(*[[u'bar', u'bar', u'baz', u'baz', u'foo',
Expand Down Expand Up @@ -276,6 +286,8 @@ def create_msgpack_data():
del data['frame']['cat_onecol']
del data['frame']['cat_and_float']
del data['scalars']['period']
# del data['index']['interval']
del data['offsets']
return _u(data)


Expand Down

0 comments on commit 84e3978

Please sign in to comment.