-
Notifications
You must be signed in to change notification settings - Fork 116
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
SNOW-1559025 Implement DatetimeIndex.mean
and DatetimeIndex.std
#2292
Merged
sfc-gh-vbudati
merged 13 commits into
main
from
vbudati/SNOW-1559025-datetimeindex-mean-std
Sep 18, 2024
Merged
SNOW-1559025 Implement DatetimeIndex.mean
and DatetimeIndex.std
#2292
sfc-gh-vbudati
merged 13 commits into
main
from
vbudati/SNOW-1559025-datetimeindex-mean-std
Sep 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfc-gh-vbudati
requested review from
sfc-gh-evandenberg and
sfc-gh-rdurrani
September 13, 2024 21:51
sfc-gh-azhan
approved these changes
Sep 16, 2024
Co-authored-by: Andong Zhan <[email protected]>
sfc-gh-rdurrani
approved these changes
Sep 16, 2024
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.
LGTM!
sfc-gh-azhan
requested changes
Sep 18, 2024
# Need to convert timestamp to seconds to prevent overflow when aggregating. | ||
# Cannot directly convert a timestamp to a float; therefore, first convert it to an int then a float. | ||
return to_timedelta( | ||
(self.to_series().astype(int) / 1e9).agg( |
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.
Suggested change
(self.to_series().astype(int) / 1e9).agg( | |
(self.to_series().astype(int) // 1_000_000_000).agg( |
1e9
is a float not a int.
Please also describe why we did this.
…com:snowflakedb/snowpark-python into vbudati/SNOW-1559025-datetimeindex-mean-std
sfc-gh-azhan
requested changes
Sep 18, 2024
src/snowflake/snowpark/modin/plugin/extensions/datetime_index.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Andong Zhan <[email protected]>
sfc-gh-azhan
approved these changes
Sep 18, 2024
sfc-gh-vbudati
deleted the
vbudati/SNOW-1559025-datetimeindex-mean-std
branch
September 18, 2024 20:14
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1559025
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Implemented
DatetimeIndex.mean
andDatetimeIndex.std
.