mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] add feature count to Statistics by categories output (fix #9871)
This commit is contained in:
parent
285fa01c30
commit
5e5abdb419
@ -87,11 +87,11 @@ class StatisticsByCategories(GeoAlgorithm):
|
||||
except:
|
||||
pass
|
||||
|
||||
fields = ['category', 'min', 'max', 'mean', 'stddev']
|
||||
fields = ['category', 'min', 'max', 'mean', 'stddev', 'count']
|
||||
writer = output.getTableWriter(fields)
|
||||
for (cat, v) in values.items():
|
||||
(min, max, mean, stddev) = calculateStats(v)
|
||||
record = [cat, min, max, mean, stddev]
|
||||
record = [cat, min, max, mean, stddev, len(v)]
|
||||
writer.addRecord(record)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user