Skip to content

Commit

Permalink
support sum
Browse files Browse the repository at this point in the history
  • Loading branch information
onesuper committed Nov 16, 2016
1 parent 3a4b47e commit 131c369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pandasticsearch/operators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: UTF-8 -*-

_metric_aggs = ('avg', 'min', 'max', 'cardinality', 'value_count',
_metric_aggs = ('avg', 'min', 'max', 'cardinality', 'value_count', 'sum'
'percentiles', 'percentile_ranks')

_sort_mode = ('min', 'max', 'sum', 'avg', 'median')
Expand Down
4 changes: 4 additions & 0 deletions pandasticsearch/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def min(self):
def avg(self):
return MetricAggregator(self._field, 'avg')

@property
def sum(self):
return MetricAggregator(self._field, 'sum')

@property
def value_count(self):
return MetricAggregator(self._field, 'value_count')
Expand Down

0 comments on commit 131c369

Please sign in to comment.