filter: Use intermediate columns for grouping#1070
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1070 +/- ##
==========================================
+ Coverage 61.77% 61.80% +0.03%
==========================================
Files 52 52
Lines 6316 6321 +5
Branches 1550 1551 +1
==========================================
+ Hits 3902 3907 +5
Misses 2141 2141
Partials 273 273 ☔ View full report in Codecov by Sentry. |
3 tasks
Member
|
Grouping by day wouldn't be that terrible as a side effect 🙃 |
f2a6d71 to
3043718
Compare
joverlee521
requested changes
Oct 25, 2022
Contributor
joverlee521
left a comment
There was a problem hiding this comment.
It's nice to remove the side effect of grouping by day. This is open enough to add grouping by day as an official group-by category in the future if requested.
I only have one comment on the internal prefix string.
Previously: 1. year/month/day columns were created on the DataFrame used for grouping. 2. month was overwritten with (year, month). This allowed year to be used for grouping, but also the same for day which was an unintended side effect. Instead of adding columns with those names, use names with a more distinct prefix that can be safely discarded before grouping happens.
8375de9 to
7eacd26
Compare
joverlee521
approved these changes
Oct 25, 2022
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of proposed changes
Previously:
This allowed year to be used for grouping, but also the same for day which was an unintended side effect. Instead of adding columns with those names, use names with a more distinct prefix that can be safely discarded before grouping happens.
Related issue(s)
Fixes #1069
Testing
Checklist