From 78a8d33116344a4ba52f0f7b52569bd57ed56988 Mon Sep 17 00:00:00 2001 From: Huan Li Date: Wed, 9 Jul 2014 16:14:16 +0800 Subject: [PATCH] BUG: DatetimeIndex.__iter__ creates a temp array of Timestamp (GH7683) --- doc/source/v0.14.1.txt | 1 + pandas/tseries/index.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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):