-
Notifications
You must be signed in to change notification settings - Fork 100
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
Bugfix/935/match pandas behviour when aggregating columns with nans #1450
Bugfix/935/match pandas behviour when aggregating columns with nans #1450
Conversation
auto out_ptr = reinterpret_cast<RawType*>(col->ptr()); | ||
for(auto i = 0u; i < unique_values; ++i, ++in_ptr, ++out_ptr) { | ||
*out_ptr = in_ptr->value_; | ||
for (auto it = column_data.begin<dynamic_schema_tdt>(); it != column_data.end<dynamic_schema_tdt>(); ++it, ++in_ptr) { |
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.
Don't hugely mind but snake case type is not the normal pattern. Is there a reason why this diverges?
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.
Nope, will change
@@ -36,6 +36,29 @@ def test_group_on_float_column_with_nans(lmdb_version_store): | |||
assert_frame_equal(expected, received) | |||
|
|||
|
|||
# TODO: Add first and last once un-feature flagged | |||
@pytest.mark.parametrize("aggregator", ("sum", "min", "max", "mean", "count")) | |||
def test_aggregate_float_columns_with_nans(lmdb_version_store, aggregator): |
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.
The test looks correct to me
Fixes #935
Also addresses two of the bullet points from #1439: