-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix Categorical comparsion with Series of dtype 'category' #16667
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 |
---|---|---|
|
@@ -202,6 +202,12 @@ def test_is_equal_dtype(self): | |
CategoricalIndex(c1, categories=list('cab')))) | ||
assert not c1.is_dtype_equal(CategoricalIndex(c1, ordered=True)) | ||
|
||
# GH 16659 | ||
s1 = pd.Series(c1) | ||
assert c1.is_dtype_equal(s1) | ||
assert not c2.is_dtype_equal(s1) | ||
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. can u add some tests for things that are not is_dryoe_equal (i don't remember if these are sufficiently covered) e.g. pass in scalers, ndarray, Dataframe 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. and cycle thru all Indexes (except CI) 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. can you update for this |
||
assert not c3.is_dtype_equal(s1) | ||
|
||
def test_constructor(self): | ||
|
||
exp_arr = np.array(["a", "b", "c", "a", "b", "c"], dtype=np.object_) | ||
|
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.
merge issues