Constructs a new scalar categorical whose value is undefined.
Constructs a new categorical array from the given values.
vals is the array of values to convert to categoricals.
valueset is the set of all values from which vals is drawn. If omitted, it defaults to the unique values in vals.
category_names is a list of category names corresponding to valueset. If omitted, it defaults to valueset, converted to strings.
Ordinal is a logical indicating whether the category values in obj have a numeric ordering relationship. Defaults to false.
Protected indicates whether obj should be protected, which prevents the addition of new categories to the array. Defaults to false.