Changeset 10700:2f2afcde5404 in orange for Orange/data/utils.py


Ignore:
Timestamp:
03/28/12 15:27:32 (2 years ago)
Author:
Peter Husen <peter@…>
Branch:
default
Message:

Added min, max, sum and count as aggregate options in Group By

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/utils.py

    r10143 r10700  
    233233                      "geometric mean": geometric_mean, 
    234234                      "harmonic mean": harmonic_mean, 
     235                      "min": lambda values: min([float(v) for v in values if not v.is_special()]), 
     236                      "max": lambda values: max([float(v) for v in values if not v.is_special()]), 
     237                      "sum": lambda values: sum([float(v) for v in values if not v.is_special()]), 
     238                      "count": len, 
    235239                      "join": lambda values: ", ".join(map(str, values)) 
    236240                      } 
Note: See TracChangeset for help on using the changeset viewer.