def _set_codes(self, codes):
        raise ValueError("cannot set Categorical codes directly")
Not settable by the user directly
dataset/ETHPy150Open pydata/pandas/pandas/core/categorical.py/Categorical._set_codes