-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Change DatetimeIndex.time to also return timezone info #21865
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
Changes from 5 commits
4578ce4
91db23d
6e15942
79d222e
6f015a0
7bd8d43
3a06543
b7e29cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -577,15 +577,7 @@ def time(self): | |
""" | ||
Returns numpy array of datetime.time. The time part of the Timestamps. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you expand this docstring to also mention that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that look good? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small nit: could you replace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem |
||
""" | ||
# If the Timestamps have a timezone that is not UTC, | ||
# convert them into their i8 representation while | ||
# keeping their timezone and not using UTC | ||
if self.tz is not None and self.tz is not utc: | ||
timestamps = self._local_timestamps() | ||
else: | ||
timestamps = self.asi8 | ||
|
||
return tslib.ints_to_pydatetime(timestamps, box="time") | ||
return tslib.ints_to_pydatetime(self.asi8, self.tz, box="time") | ||
|
||
@property | ||
def date(self): | ||
|
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.
Missing a closing backtick for the issue number. Can you also add an :attr: ref for DatetimeIndex.time?
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.
Does that look good?