Skip to content

Commit 646b4a2

Browse files
committed
Pivot: Show 'cannot_aggregate' msg for StringVariables
1 parent 918508b commit 646b4a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Orange/widgets/data/owpivot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,11 @@ def no_col_feature(self):
855855
def skipped_aggs(self):
856856
def add(fun):
857857
data, var = self.data, self.val_feature
858+
primitive_funcs = Pivot.ContVarFunctions + Pivot.DiscVarFunctions
858859
return data and not var and fun not in Pivot.AutonomousFunctions \
859860
or var and var.is_discrete and fun in Pivot.ContVarFunctions \
860-
or var and var.is_continuous and fun in Pivot.DiscVarFunctions
861+
or var and var.is_continuous and fun in Pivot.DiscVarFunctions \
862+
or var and not var.is_primitive() and fun in primitive_funcs
861863
skipped = [str(fun) for fun in self.sel_agg_functions if add(fun)]
862864
return ", ".join(sorted(skipped))
863865

0 commit comments

Comments
 (0)