JuliaData / CategoricalArrays.jl

Arrays for working with categorical data (both nominal and ordinal)
Other
125 stars 33 forks source link

Prettier IO methods for CategoricalValue #370

Closed juliohm closed 3 years ago

juliohm commented 3 years ago

It would be nice to show categories as colored squares with labels so that ML users can see different categories visually in tabular displays such as the one shipped with Pluto:

image

It suffices to define a prettier IO method for CategoricalValue. Pluto will display it properly in the table.

bkamins commented 3 years ago

Or even Cat(value) would be nice (and play well with what we print as eltype in DataFrames.jl).

juliohm commented 3 years ago

Yeah any improvement would be great :) Maybe Colors.jl is a useful dependency here?

nalimilan commented 3 years ago

Duplicate of https://github.com/fonsp/Pluto.jl/issues/807. https://github.com/JuliaData/CategoricalArrays.jl/pull/371 should improve the situation a lot (though the quotes are still printed for strings).