Skip to content
Permalink
Browse files

[processing] fix Statistics by categories algorithm

  • Loading branch information
alexbruy committed Sep 5, 2013
1 parent 4a6eec7 commit 8f19acbbd76eac4840e438d284232e7f3e436de2
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/plugins/processing/algs/StatisticsByCategories.py
@@ -77,9 +77,10 @@ def processAlgorithm(self, progress):
except:
pass

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

0 comments on commit 8f19acb

Please sign in to comment.
You can’t perform that action at this time.