Skip to content

Create __iter__() for DatetimeIndex #723

Closed
@Dr-Irv

Description

@Dr-Irv

I also ran in to this using date_range.

Workaround is good for now:

for ts in cast(Iterator[datetime], date_range(start='1/1/2023', end='1/08/2023', freq='6H', tz=timezone.utc)):
   ....

Originally posted by @davetapley in #502 (comment)

Should create DatetimeIndex.__iter__() returning Timestamp

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexRelated to the Index class or subclassesTimestampCod related to pd.Timestamp

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions