Skip to content

Commit 8b8b714

Browse files
committed
Merge pull request #3531 from jreback/hdf_bug
ENH: HDFStore enhancements
2 parents 17e1f21 + 9120b05 commit 8b8b714

File tree

7 files changed

+263
-40
lines changed

7 files changed

+263
-40
lines changed

RELEASE.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ pandas 0.11.1
3838
- Fixed various issues with internal pprinting code, the repr() for various objects
3939
including TimeStamp and *Index now produces valid python code strings and
4040
can be used to recreate the object, (GH3038_), (GH3379_), (GH3251_)
41+
- ``HDFStore``
42+
43+
- will retain index attributes (freq,tz,name) on recreation (GH3499_)
44+
- will warn with a FrequencyWarning if you are attempting to append
45+
an index with a different frequency than the existing
46+
- support datelike columns with a timezone as data_columns (GH2852_)
4147

4248
**API Changes**
4349

@@ -89,6 +95,7 @@ pandas 0.11.1
8995
.. _GH3251: https://github.com/pydata/pandas/issues/3251
9096
.. _GH3379: https://github.com/pydata/pandas/issues/3379
9197
.. _GH3480: https://github.com/pydata/pandas/issues/3480
98+
.. _GH2852: https://github.com/pydata/pandas/issues/2852
9299
.. _GH3454: https://github.com/pydata/pandas/issues/3454
93100
.. _GH3457: https://github.com/pydata/pandas/issues/3457
94101
.. _GH3491: https://github.com/pydata/pandas/issues/3491
@@ -105,7 +112,7 @@ pandas 0.11.1
105112
.. _GH3546: https://github.com/pydata/pandas/issues/3546
106113
.. _GH3468: https://github.com/pydata/pandas/issues/3468
107114
.. _GH3448: https://github.com/pydata/pandas/issues/3448
108-
.. _GH3449: https://github.com/pydata/pandas/issues/3449
115+
.. _GH3499: https://github.com/pydata/pandas/issues/3499
109116
.. _GH3495: https://github.com/pydata/pandas/issues/3495
110117
.. _GH3492: https://github.com/pydata/pandas/issues/3492
111118
.. _GH3493: https://github.com/pydata/pandas/issues/3493

doc/source/v0.11.1.txt

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.. _whatsnew_0120:
1+
.. _whatsnew_0111:
22

3-
v0.12.0 (??)
3+
v0.11.1 (??)
44
------------------------
55

66
This is a major release from 0.11.0 and includes many new features and
@@ -12,13 +12,21 @@ API changes
1212

1313
Enhancements
1414
~~~~~~~~~~~~
15-
- pd.read_html() can now parse HTML string, files or urls and return dataframes
15+
- ``pd.read_html()`` can now parse HTML string, files or urls and return dataframes
1616
courtesy of @cpcloud. (GH3477_)
17+
- ``HDFStore``
18+
19+
- will retain index attributes (freq,tz,name) on recreation (GH3499_)
20+
- will warn with a FrequencyWarning if you are attempting to append
21+
an index with a different frequency than the existing
22+
- support datelike columns with a timezone as data_columns (GH2852_)
1723

1824
See the `full release notes
1925
<https://github.com/pydata/pandas/blob/master/RELEASE.rst>`__ or issue tracker
2026
on GitHub for a complete list.
2127

2228
.. _GH2437: https://github.com/pydata/pandas/issues/2437
29+
.. _GH2852: https://github.com/pydata/pandas/issues/2852
2330
.. _GH3477: https://github.com/pydata/pandas/issues/3477
2431
.. _GH3492: https://github.com/pydata/pandas/issues/3492
32+
.. _GH3499: https://github.com/pydata/pandas/issues/3499

doc/source/whatsnew.rst

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ These are new features and improvements of note in each release.
1818

1919
.. include:: v0.12.0.txt
2020

21+
.. include:: v0.11.1.txt
22+
2123
.. include:: v0.11.0.txt
2224

2325
.. include:: v0.10.1.txt

pandas/core/index.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ class Index(np.ndarray):
8383

8484
_engine_type = _index.ObjectEngine
8585

86-
def __new__(cls, data, dtype=None, copy=False, name=None):
86+
def __new__(cls, data, dtype=None, copy=False, name=None, **kwargs):
8787
from pandas.tseries.period import PeriodIndex
8888
if isinstance(data, np.ndarray):
8989
if issubclass(data.dtype.type, np.datetime64):
9090
from pandas.tseries.index import DatetimeIndex
91-
result = DatetimeIndex(data, copy=copy, name=name)
91+
result = DatetimeIndex(data, copy=copy, name=name, **kwargs)
9292
if dtype is not None and _o_dtype == dtype:
9393
return Index(result.to_pydatetime(), dtype=_o_dtype)
9494
else:
@@ -102,7 +102,7 @@ def __new__(cls, data, dtype=None, copy=False, name=None):
102102
except TypeError:
103103
pass
104104
elif isinstance(data, PeriodIndex):
105-
return PeriodIndex(data, copy=copy, name=name)
105+
return PeriodIndex(data, copy=copy, name=name, **kwargs)
106106

107107
if issubclass(data.dtype.type, np.integer):
108108
return Int64Index(data, copy=copy, dtype=dtype, name=name)
@@ -123,10 +123,10 @@ def __new__(cls, data, dtype=None, copy=False, name=None):
123123
if (inferred.startswith('datetime') or
124124
tslib.is_timestamp_array(subarr)):
125125
from pandas.tseries.index import DatetimeIndex
126-
return DatetimeIndex(subarr, copy=copy, name=name)
126+
return DatetimeIndex(subarr, copy=copy, name=name, **kwargs)
127127

128128
elif inferred == 'period':
129-
return PeriodIndex(subarr, name=name)
129+
return PeriodIndex(subarr, name=name, **kwargs)
130130

131131
subarr = subarr.view(cls)
132132
subarr.name = name

0 commit comments

Comments
 (0)