-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ERR automatic broadcast for merging different levels, #9455 #12219
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -459,13 +459,15 @@ def test_join_inner_multiindex(self): | |
# _assert_same_contents(expected, expected2.ix[:, expected.columns]) | ||
|
||
def test_join_hierarchical_mixed(self): | ||
# GH 2024 | ||
df = DataFrame([(1, 2, 3), (4, 5, 6)], columns=['a', 'b', 'c']) | ||
new_df = df.groupby(['a']).agg({'b': [np.mean, np.sum]}) | ||
other_df = DataFrame( | ||
[(1, 2, 3), (7, 10, 6)], columns=['a', 'b', 'd']) | ||
other_df.set_index('a', inplace=True) | ||
|
||
result = merge(new_df, other_df, left_index=True, right_index=True) | ||
# GH 9455, 12219 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the only time this warning is shown in the entire codebase? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? The message is shown when |
||
with tm.assert_produces_warning(UserWarning): | ||
result = merge(new_df, other_df, left_index=True, right_index=True) | ||
self.assertTrue(('b', 'mean') in result) | ||
self.assertTrue('b' in result) | ||
|
||
|
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.
ahh didn't even notice, this is ONLY checking the
levels
, it should be doing something like: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.
Oh, I see. I've been away for some time, but I just went back. I can do a PR for that.