MCPcopy Create free account
hub / github.com/dask/dask / DaskColumn

Class DaskColumn

dask/dataframe/dask_expr/_interchange.py:41–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41class 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

Callers 1

get_columnsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected