-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: assert_frame_equal and assert_series_equal for frames/series with a MultiIndex #55949
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
PERF: assert_frame_equal and assert_series_equal for frames/series with a MultiIndex #55949
Conversation
Nice! Thanks @lukemanley |
nice! |
) | ||
assert_numpy_array_equal(left.codes[level], right.codes[level]) | ||
except AssertionError: | ||
# cannot use get_level_values here because it can change dtype |
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.
how does it change dtype?
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.
thats an old comment and I'm not sure its valid anymore. opened #55971 to remove
@@ -576,6 +591,9 @@ def raise_assert_detail( | |||
|
|||
{message}""" | |||
|
|||
if isinstance(index_values, Index): | |||
index_values = np.array(index_values) |
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.
array->asarray can avoid a copy
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.
opened #55971 to update
doc/source/whatsnew/v2.2.0.rst
file if fixing a bug or adding a new feature.