Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define value(x) alternative to DataAPI.unwrap(x) #399

Open
jariji opened this issue Feb 12, 2023 · 0 comments
Open

Define value(x) alternative to DataAPI.unwrap(x) #399

jariji opened this issue Feb 12, 2023 · 0 comments

Comments

@jariji
Copy link

jariji commented Feb 12, 2023

DataAPI defines unwrap(x) = x so it is prone to mistakes and confusion. I propose

CategoricalArrays.value(x::CategoricalValue) = levels(x)[refcode(x)]

The name is a bit too general, suggestions welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant