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

Display categorical data variables with natural labels instead of numerical indices #17

Open
00krishna opened this issue Apr 24, 2024 · 0 comments

Comments

@00krishna
Copy link
Collaborator

One feature we would like to introduce is the ability to show categorical data in a dataframe with natural label. Categorical data is encoded with a numerical key and generally text value, such as Dict( 1 => "january, 2 => "february", 3 => "march", ...). When looking at a dataframe, the current view shows the numerical keys, because these indicates are saved in the original data.

The example below is manufactured, but shows what the current view will look like.

julia> DataFrame(month = [1, 2, 3], sensor1 = [2.1, 2.4, 5.1])
3×2 DataFrame
 Row │ month  sensor1 
     │ Int64  Float64 
─────┼────────────────
   1 │     1      2.1
   2 │     2      2.4
   3 │     3      5.1

Instead we would like this data to display in a more natural and intuitive manner, showing the text labels. And example of this would look like:

Row │ month     sensor1 
     │ String    Float64 
─────┼───────────────────
   1 │ january       2.1
   2 │ february      2.4
   3 │ march         5.1

One step to doing this is with potentially separating the LabelledArrays type from the ReadStatTables.jl package.

We have asked if the owners of that package could separate the LabelledArrays type into a separate package. That way, we could import just the array type, and not the entire ReadStatTables.jl package as a dependency.

We are tracking that request at:

junyuan-chen/ReadStatTables.jl#41

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