Skip to content

Commit

Permalink
[processing] fix Statistics by categories algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Sep 6, 2013
1 parent 4a6eec7 commit 8f19acb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/plugins/processing/algs/StatisticsByCategories.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ def processAlgorithm(self, progress):
except: except:
pass pass


fields = [QgsField("category", QVariant.String), QgsField("min", QVariant.Double), #fields = [QgsField("category", QVariant.String), QgsField("min", QVariant.Double),
QgsField("max", QVariant.Double), QgsField("mean", QVariant.Double), # QgsField("max", QVariant.Double), QgsField("mean", QVariant.Double),
QgsField("stddev", QVariant.Double)] # QgsField("stddev", QVariant.Double)]
fields = ["category", "min", "max", "mean", "stddev"]
writer = output.getTableWriter(fields) writer = output.getTableWriter(fields)
for cat, v in values.items(): for cat, v in values.items():
min, max, mean, stddev = calculateStats(v) min, max, mean, stddev = calculateStats(v)
Expand Down

0 comments on commit 8f19acb

Please sign in to comment.