diff --git a/doc/source/whatsnew/v0.17.0.txt b/doc/source/whatsnew/v0.17.0.txt index 68d3861599cbd..1a31f38b585cf 100644 --- a/doc/source/whatsnew/v0.17.0.txt +++ b/doc/source/whatsnew/v0.17.0.txt @@ -894,7 +894,7 @@ Bug Fixes - Bug in clearing the cache on ``DataFrame.pop`` and a subsequent inplace op (:issue:`10912`) - Bug in indexing with a mixed-integer ``Index`` causing an ``ImportError`` (:issue:`10610`) - Bug in ``Series.count`` when index has nulls (:issue:`10946`) - +- Bug in pickling of a non-regular freq ``DatetimeIndex`` (:issue:`11002`) - Bug causing ``DataFrame.where`` to not respect the ``axis`` parameter when the frame has a symmetric shape. (:issue:`9736`) - Bug in ``Table.select_column`` where name is not preserved (:issue:`10392`) diff --git a/pandas/tseries/index.py b/pandas/tseries/index.py index b1198f9758938..4ba15d319dc62 100644 --- a/pandas/tseries/index.py +++ b/pandas/tseries/index.py @@ -120,7 +120,8 @@ def _new_DatetimeIndex(cls, d): # data are already in UTC # so need to localize tz = d.pop('tz',None) - result = cls.__new__(cls, **d) + + result = cls.__new__(cls, verify_integrity=False, **d) if tz is not None: result = result.tz_localize('UTC').tz_convert(tz) return result diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py index 84a4c3e08e493..a021195ea6c04 100644 --- a/pandas/tseries/tests/test_timeseries.py +++ b/pandas/tseries/tests/test_timeseries.py @@ -2142,8 +2142,8 @@ def test_period_resample_with_local_timezone_dateutil(self): def test_pickle(self): - #GH4606 + # GH4606 p = self.round_trip_pickle(NaT) self.assertTrue(p is NaT) @@ -2153,6 +2153,11 @@ def test_pickle(self): self.assertTrue(idx_p[1] is NaT) self.assertTrue(idx_p[2] == idx[2]) + # GH11002 + # don't infer freq + idx = date_range('1750-1-1', '2050-1-1', freq='7D') + idx_p = self.round_trip_pickle(idx) + tm.assert_index_equal(idx, idx_p) def _simple_ts(start, end, freq='D'): rng = date_range(start, end, freq=freq)