-
-
Notifications
You must be signed in to change notification settings - Fork 19k
Closed
Labels
API DesignCategoricalCategorical Data TypeCategorical Data TypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Milestone
Description
I'm not entirely sure why (perhaps just the trouble of implementing it), but categoricals do not currently support arithmetic:
In contrast to statistical categorical variables, categorical data might have an order (e.g. ‘strongly agree’ vs ‘agree’ or ‘first observation’ vs. ‘second observation’), but numerical operations (additions, divisions, ...) are not possible.
Similarly to string operations (#8627), arithmetic with scalars could very efficient transform categoricals into new categoricals.
In contrast, array + array operations should probably just return a normal array.
Metadata
Metadata
Assignees
Labels
API DesignCategoricalCategorical Data TypeCategorical Data TypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations