From 28bb39bdd1dcbbb55ace6c820dc36e12518199b8 Mon Sep 17 00:00:00 2001 From: cvanoli Date: Mon, 3 Aug 2020 15:43:59 -0300 Subject: [PATCH] added min and max to the agg function --- variable_generators/generators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variable_generators/generators.py b/variable_generators/generators.py index 0592e09..495fee7 100644 --- a/variable_generators/generators.py +++ b/variable_generators/generators.py @@ -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)