-
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
filter: Fix groupby with incomplete dates #808
Conversation
Codecov Report
@@ Coverage Diff @@
## master #808 +/- ##
==========================================
+ Coverage 33.76% 33.81% +0.04%
==========================================
Files 41 41
Lines 5896 5900 +4
Branches 1464 1465 +1
==========================================
+ Hits 1991 1995 +4
Misses 3822 3822
Partials 83 83
Continue to review full report at Codecov.
|
@huddlej from #807 (comment):
Done: 1e88686
I did this to fix
This is already tested here: augur/tests/test_filter_groupby.py Lines 107 to 119 in 1adfed8
|
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.
This looks great and fixes the issue in the original dataset where I found it. Thank you for the quick work on this, @victorlin! If you can merge this, I'll release it today in 13.0.5.
This PR fixes #807.
Summary
augur/augur/filter.py
Lines 916 to 918 in 1adfed8
set_axis
here raisesValueError
when the entiremetadata
chunk has incomplete dates (e.g.2020
), since the single column returned bypandas.Series.str.split
can't be mapped to all 3date_cols
.This PR addresses the issue with:
set_axis
with the correct amount of column names based onpandas.Series.str.split
.pandas.NA
.New code:
augur/augur/filter.py
Lines 916 to 921 in a6cdb3e
Testing