[FEA] Enforce unsigned integer codes for cudf Python `CategoricalColumn`
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
Currently cudf Python does not enforce the integer type of `CategoricalColumn` codes (in `.children`). They are usually signed from `.astype` operations (via `_label_encode`) or unsigned when going through the constructor directly. When `CategoricalColumn` goes through libcudf, we usually just operate on these codes which can lead to inconsistencies if casting between unsigned and signed types is involved.
**Describe the solution you'd like**
Ideally we should be using unsigned integers consistently to capture a greater number of distinct categories as well as smaller sized types to capture more distinct categories on the low end.
**Describe alternatives you've considered**
This outcome may also depend on https://github.com/rapidsai/cudf/pull/8567
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.