NVIDIA / NVIDIA/cudf

[FEA] Enforce unsigned integer codes for cudf Python `CategoricalColumn`

Open
#16,622 0 comments 0 reactions 0 assignees View on GitHub
feature request Python
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.