Skip to content

Conversation

@Detoro
Copy link
Contributor

@Detoro Detoro commented Aug 13, 2023

@Detoro Detoro requested a review from MarcoGorelli as a code owner August 13, 2023 19:15
@Detoro Detoro changed the title Feature Fixed DatetimeIndex.tz_convert() .freq attribute Aug 13, 2023

# No conversion since timestamps are all UTC to begin with
dtype = tz_to_dtype(tz, unit=self.unit)
return self._simple_new(self._ndarray, dtype=dtype, freq=self.freq)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is an appropriate fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think so? and what would be an appropriate fix?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the failing tests seems like this behavior was relied upon

Copy link
Contributor Author

@Detoro Detoro Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolving this issue is undoing work done a while ago. The frequency attribute was set as part of this issue #25241- why do you think it should not be reset?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the failing unit test the freq should be preserved

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DatetimeIndex.tz_convert() has incorrcect .freq attribute

2 participants