Implement categorical columns
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 164
- Avg merge
- 7h 31m
- Merged PRs (30d)
- 1
Description
A categorical column is semantically equivalent to a string column, except that it uses integer codes to store the values. The layout of such column is therefore:
```
T values[n]; // array of indices into a dictionary
StringColumn dict; // "dictionary" column
```
(where `T` could be `int8`, `int16` or `int32`).
Tasks and operations we can support for categoricals are:
- [x] [implement types `cat8`, `cat16` and `cat32`](https://github.com/h2oai/datatable/pull/3149)
- [x] implement `Categorical_ColumnImpl` internals
- [ ] think through and implement `N/A` handling
- [x] create a categorical column from a python list
- [x] convert a categorical column into a python list
- [x] display categorical columns in a terminal
- [x] element access through `[i, j]`
- [x] column access through `[:, j]`
- [x] [slice access through `[i, :]`](https://github.com/h2oai/datatable/pull/3379)
- [x] [access the list of categories](https://github.com/h2oai/datatable/pull/3367)
- [x] [access the list of codes](https://github.com/h2oai/datatable/pull/3371)
- [x] statistics
Conversion:
- [ ] implement type casts to categorical columns
- [ ] categoricals
- [x] [other types](https://github.com/h2oai/datatable/pull/3365)
- [x] [implement type casts from categorical columns](https://github.com/h2oai/datatable/pull/3372)
- [ ] read/write categorical columns from/into Jay
- [x] [write categorical columns to csv](https://github.com/h2oai/datatable/pull/3372)
- [ ] read categorical columns from csv (fread)
- [ ] convert categorical columns to numpy
- [ ] create categorical columns from numpy
- [ ] convert categorical column to pandas
- [ ] create categorical column from pandas
- [ ] convert categorical columns to pyarrow
- [ ] create categorical columns from pyarrow
Contributor guide
Assessment
This issue has not been assessed yet.