Enum Definitions

The Enum type is a data type for categorical data with a predefined set of valid values. Each Enum definition specifies both the allowed values and their order.

Enum types are not auto-inferred when loading CSV files. You create an Enum definition first, then convert string columns to that Enum type. Enum definitions are shared across the entire project and can be referenced by columns in multiple datasets. Each Enum definition can contain up to 50 values. For categories exceeding this limit, use string type instead.

Opening the Manage Enums Tab

Select Data > Manage Enums... from the menu bar to open the Enum Definitions tab. Use this tab to create, edit, and delete Enum definitions.

Manage Enums tab

Creating an Enum Manually

New Enum

  1. Click + New Enum
  2. Enter the Enum name
  3. Enter the values. Values are numbered in the order you enter them, and this numbering defines the Enum's value order
  4. Click + Add Value to add more values
  5. Click Save

Validation Rules

  • Enum name is required and must be unique among existing Enum names
  • At least one value is required
  • Duplicate values are not allowed

Creating an Enum from a Column

You can auto-generate an Enum definition from the unique values of an existing string column.

  1. Click Create from Column
  2. Select a dataset
  3. Select a column. Only string-type columns are available
  4. Enter the Enum name. The default is {column_name}_enum
  5. Review the preview showing unique values with their counts and percentages
  6. Click Create Enum

Values are sorted by frequency in descending order. If the column has more than 50 unique values, only the top 50 most frequent values are used. A warning is displayed in the preview so you can verify which values are included.

If the frequency-based order does not suit your purpose, you can change the value order by editing the Enum after creation.

Create Enum from Column dialog

Editing and Deleting Enums

Editing

Click Edit on an Enum card to enter edit mode. You can change the name, add or remove values, and reorder values.

When columns have been converted to this Enum type, dependency checks are performed.

  • Renaming: Not allowed when dependent columns exist
  • Removing values: A warning dialog is displayed when dependent columns exist. Data containing the removed values becomes invalid, so review before confirming
  • Reordering: A warning dialog is displayed when dependent columns exist. This affects sort results for columns with ordinal scale, so review before confirming
  • Adding values: Allowed without restrictions, even when dependent columns exist

Deleting

Click Delete on an Enum card to delete the Enum definition. Deletion is not allowed when dependent columns exist. Change the data type of dependent columns first.

Converting String Columns to Enum Type

After creating an Enum definition, use Column Type Conversion to convert string columns to the Enum type.

  1. Right-click a column header in Data Table and select Convert Column Types...
  2. In the To dropdown for the column you want to convert, select the Enum name you created
  3. Click Preview to review the conversion result
  4. Click Apply to execute the conversion

The conversion result is created as a new dataset. The original dataset is not modified.

Ordinal Scale and Graph Ordering

Changing to Ordinal Scale

Enum columns default to the nominal scale. If the value order is meaningful, right-click the column header in Data Table and select Edit Scale to change it to the ordinal scale. Measurement scales also affect which analysis methods are available. See Data Types and Measurement Scales for details.

Graph Axis Ordering

When you use an Enum column as a graph axis, the axis displays values in the order defined in the Enum definition regardless of the measurement scale. String-type categorical columns are sorted alphabetically, so converting to Enum type is useful when you need a specific display order.

See also