diff --git a/doc/source/v0.14.1.txt b/doc/source/v0.14.1.txt index 8fde5df6fd75a..886642f25687d 100644 --- a/doc/source/v0.14.1.txt +++ b/doc/source/v0.14.1.txt @@ -292,3 +292,4 @@ Bug Fixes - Bug in ``to_sql`` taking the boolean column as text column (:issue:`7678`) - Bug in grouped `hist` doesn't handle `rot` kw and `sharex` kw properly (:issue:`7234`) +- Bug in ``DatetimeIndex``, ``__iter__`` creates a temp array of ``Timestamp`` (:issue:`7683`) diff --git a/pandas/tseries/index.py b/pandas/tseries/index.py index de758c4c8a579..38e66233a948f 100644 --- a/pandas/tseries/index.py +++ b/pandas/tseries/index.py @@ -1477,7 +1477,7 @@ def normalize(self): tz=self.tz) def __iter__(self): - return iter(self.asobject) + return (self._box_func(v) for v in self.asi8) def searchsorted(self, key, side='left'): if isinstance(key, np.ndarray):