-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: added test_join_multiindex_dates #44200
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
Conversation
@@ -323,6 +323,29 @@ def test_join_multiindex_leftright(self): | |||
tm.assert_frame_equal(df1.join(df2, how="right"), exp) | |||
tm.assert_frame_equal(df2.join(df1, how="left"), exp[["value2", "value1"]]) | |||
|
|||
def test_join_multiindex_dates(self): |
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.
if 'join' is whats being tested here, can you avoid using groupby and first?
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.
Yes, I will change the test
df3 = DataFrame(index=multi_index, columns=["col3"], data=[4]) | ||
|
||
# if fails, raises error | ||
df1.join([df2, df3]) |
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.
construct the expected frame and use assert_frame_equal
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
closing as stale, pls ping if you want to continue working. |
Added tests to make sure that joining dataframes with multiindices containing dates doesn't break.