-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Fixed DatetimeIndex.tz_convert() .freq attribute #54532
Conversation
@@ -896,7 +897,7 @@ def tz_convert(self, tz) -> Self: | |||
|
|||
# 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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. |
DatetimeIndex.tz_convert()
has incorrcect.freq
attribute #49696