Skip to content

Making a column type of 'enum' #2096

Answered by saulpw
DangarStu asked this question in Q&A
Oct 31, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @DangarStu, welcome! There's a setcol-format-enum which you can use to set mapping of values to more readable representation; for example if a field has 1 meaning "red" and 2 meaning "blue" you use setcol-format-enum with 1=red 2=blue and it would show the mapped value instead.

But otherwise no, enums don't really exist in VisiData. What exactly would you want it to do? It sounds like you're using VisiData for data entry; do you want to get an error if you try to input a bad value? or auto-complete when you enter the first letter of a value?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DangarStu
Comment options

@DangarStu
Comment options

Answer selected by DangarStu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants