(pdtype)
Return a Numba Type instance corresponding to the given Pandas *dtype*.
    NotImplementedError is raised if unsupported Pandas dtypes.
Return a Numba Type instance corresponding to the given Pandas *dtype*.
    NotImplementedError is raised if unsupported Pandas dtypes.
Return a Numba Type instance corresponding to the given Pandas * dtype * . NotImplementedError is raised if unsupported Pandas dtypes .
def from_dtype(pdtype):
    """
    Return a Numba Type instance corresponding to the given Pandas *dtype*.
    NotImplementedError is raised if unsupported Pandas dtypes.
    """
    # TODO: use issubclass
    if isinstance(pdtype, pd.CategoricalDtype):
        if pdtype.categories is None:
            categories = None
        else:
            categories = list(pdtype.categories)
        return CategoricalDtypeType(categories=categories,
                                    ordered=pdtype.ordered)

    raise NotImplementedError("%r cannot be represented as a Numba type"
                              % (pdtype,))
def from_dtype ( pdtype ) : # TODO: use issubclass if isinstance ( pdtype , pd . CategoricalDtype ) : if pdtype . categories is None : categories = None else : categories = list ( pdtype . categories ) return CategoricalDtypeType ( categories = categories , ordered = pdtype . ordered ) raise NotImplementedError ( "%r cannot be represented as a Numba type" % ( pdtype , ) )