Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4296 +/- ##
=======================================
+ Coverage 99.7% 99.7% +0.1%
=======================================
Files 355 357 +2
Lines 39511 39577 +66
=======================================
+ Hits 39391 39457 +66
Misses 120 120
☔ View full report in Codecov by Sentry. |
eccabay
left a comment
There was a problem hiding this comment.
Just a few nitpicks, but nothing blocking!
jeremyliweishih
left a comment
There was a problem hiding this comment.
LGTM - just some nit suggestions. I would also recommend adding adding a test case where there are multiple majority lengths i.e two modes for the majority length) and note the behavior considering multiple modes in the docstring!
| for id in X[self.series_id].unique(): | ||
| series_id_len[id] = len(X[X[self.series_id] == id]) | ||
|
|
||
| # get the majority length |
There was a problem hiding this comment.
| # get the majority length | |
| majority_len = statistics.mode(series_id_len.values()) |
There was a problem hiding this comment.
Is this faster than what I currently have or is it more concise (or both)?
There was a problem hiding this comment.
Its more concise but I believe its the same time complexity. You can double check here:
There was a problem hiding this comment.
I think I'll stick to what I have currently since what I have lets me easily exit out early if all the series have the same length, which is something that Becca asked to do in one of her comments.
Pull Request Description
Closes #4297
Adds mismatched series length datacheck
Visual of what this PR does
Say there was a multiseries dataset with 5 unique series_id that each show up 20 times (so there are 100 entries in the dataset).

Let's say the first row was dropped, meaning that series_id "0" only has 19 entries while the rest of the series_id have 20 entries.

Using the mismatched series length datacheck, the validate function will return:

After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of
docs/source/release_notes.rstto include this pull request by adding :pr:123.