---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
...
154 other_codes = recode_for_categories(
155 other.codes, other.categories, self.categories, copy=False
156 )
TypeError: Categoricals can only be compared if 'categories' are the same.
I am applying this code.
I am getting this error:
How can I fix this?