def is_dtype_equal(self, other):
try:<EOL><INDENT>return hash(self.dtype) == hash(other.dtype)<EOL><DEDENT>except (AttributeError, TypeError):<EOL><INDENT>return False<EOL><DEDENT>
Returns True if categoricals are the same dtype
  same categories, and same ordered

Parameters
----------
other : Categorical

Returns
-------
bool