Skip to content

BUG: DatetimeIndex.__iter__ creates a temp array of Timestamp (GH7683) #7702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/v0.14.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
2 changes: 1 addition & 1 deletion pandas/tseries/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down