BUG: Let CategoricalIndex take CategoricalDtype as dtype argument by topper-123 · Pull Request #18116 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message is "Cannot specify both dtype
and categories
or ordered
." in both cases.
FYI, pytest can now take a parameter match
which does the same thing (i.e. with pytest.raises(ValueError, match="Cannot specify both `dtype` and `categories` or `ordered`." ):
). This is a new feature added in pytest 3.1, so its very new. Pandas doesn't seem to have a minimum specified version of pytest, but it's reasonable to be able to test pandas with version < 3.1 of pytest, though.