Skip to content

Commit

Permalink
Merge pull request #8 from UDST/agg_max_min_
Browse files Browse the repository at this point in the history
added min and max to the agg function
  • Loading branch information
cvanoli authored Aug 4, 2020
2 parents 4d2a57e + 28bb39b commit eccd7a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions variable_generators/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def func():
values = groupby.std().fillna(0)
if agg_function == 'sum':
values = groupby.sum().fillna(0)
if agg_function == 'max':
values = groupby.max().fillna(0)
if agg_function == 'min':
values = groupby.min().fillna(0)

locations_index = orca.get_table(geog).index
series = pd.Series(data=values, index=locations_index)
Expand Down

0 comments on commit eccd7a1

Please sign in to comment.