| 39 | |
| 40 | |
| 41 | class DaskColumn: |
| 42 | def __init__(self, column, allow_copy: bool = True) -> None: |
| 43 | self._col = column |
| 44 | self._allow_copy = allow_copy |
| 45 | |
| 46 | def dtype(self) -> tuple[DtypeKind, None, None, None]: |
| 47 | dtype = self._col.dtype |
| 48 | |
| 49 | if is_categorical_dtype(dtype): |
| 50 | return ( |
| 51 | DtypeKind.CATEGORICAL, |
| 52 | None, |
| 53 | None, |
| 54 | None, |
| 55 | ) |
| 56 | elif is_string_dtype(dtype): |
| 57 | return ( |
| 58 | DtypeKind.STRING, |
| 59 | None, |
| 60 | None, |
| 61 | None, |
| 62 | ) |
| 63 | else: |
| 64 | return _NP_KINDS.get(dtype.kind, None), None, None, None |