@property
def codes(self):
    from pandas import Series
    return Series(self._parent.codes, index=self.index)
@property
def codes(self):
    from pandas import Series
    return Series(self._parent.codes, index=self.index)