def __getattr__(self, key):
        if key == 'cat':
            head = self.head()
            if isinstance(head.dtype, pd.core.dtypes.CategoricalDtype):
                return head.cat
        raise AttributeError("'Series' object has no attribute %r" % key)
dataset/ETHPy150Open dask/dask/dask/dataframe/core.py/Series.__getattr__/original