-
Notifications
You must be signed in to change notification settings - Fork 129
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
Use stacked ambiguous date checking #1072
Conversation
b1373b6
to
964febd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1072 +/- ##
==========================================
+ Coverage 61.80% 61.83% +0.02%
==========================================
Files 52 52
Lines 6321 6331 +10
Branches 1551 1558 +7
==========================================
+ Hits 3907 3915 +8
Misses 2141 2141
- Partials 273 275 +2 ☔ View full report in Codecov by Sentry. |
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.
Thank you for tackling this! The changes make sense to me, but I'm just going to play devil's advocate here: Is there any legitimate reason to group by month regardless of year value?
8375de9
to
7eacd26
Compare
There could be, but that would be a separate discussion / feature request since month is already converted to (year, month): Lines 1065 to 1066 in 0a5bfc1
|
Both Series.isnull() and DataFrame.dropna() accomplish the same thing, but use just one to improve readability.
Previously, the ambiguous date checks were 1:1 with the generated date columns. This should not be the case since month needs to check for ambiguous year, and week needs to check for anything that is ambiguous. Separate the ambiguous date checking from the column generation, and update the conditions for the former to be "stacking" (i.e. year is always checked, month is checked for month/week, and day is checked for week only).
6e90865
to
07881f4
Compare
Ah, the difference between "month" (a specific one out of an ~infinite set) and "month of the year" (one of the 12). |
07881f4
to
6ec0105
Compare
Description of proposed changes
Previously, the ambiguous date checks were 1:1 with the generated date columns. This should not be the case since month needs to check for ambiguous year, and week needs to check for anything that is ambiguous.
Separate the ambiguous date checking from the column generation, and update the conditions for the former to be "stacking" (i.e. year is always checked, month is checked for month/week, and day is checked for week only).
Related issue(s)
Fixes #1071
Testing
Checklist