-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Add test to verify align behaviour on CategoricalIndex #34880
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
TST: Add test to verify align behaviour on CategoricalIndex #34880
Conversation
align
behaviour on CategoricalIndex
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.
There is a specific tests/frame/methods/test_align.py
, so we can maybe rather put it there
@jorisvandenbossche anything that still needs to happen here? |
@@ -129,6 +129,26 @@ def test_align_mixed_int(self, mixed_int_frame): | |||
) | |||
tm.assert_index_equal(bf.index, Index([])) | |||
|
|||
def test_align_categorical(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.
can you rename this to test_align_categorical_unordered and then add an ordered version (alt is to parameterize this)
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.
I guess the same holds as previous, if one categorical is ordered and the other isn't, the expected dtype
is object? If not, let me know so I can adjust the test
@MBrouns can you merge master & push? Will hopefully fix the CI issue. |
verify that aligning two dataframes with a `CategoricalIndex` does not change the type of the index.
… no shortcut path that skips aligning
thanks @MBrouns very nice |
verify that aligning two dataframes with a
CategoricalIndex
does not change the type of the index.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff