Private
Public Access
1
0

bug fixes

This commit is contained in:
Sander Roosendaal
2021-07-12 08:05:11 +02:00
parent dc55982128
commit b5537af783
2 changed files with 8 additions and 2 deletions

View File

@@ -388,7 +388,10 @@ def wavg(group, avg_name, weight_name):
In rare instance, we may not have weights, so just return the mean. Customize this if your business case
should return otherwise.
"""
d = group[avg_name]
try:
d = group[avg_name]
except KeyError:
return 0
try:
w = group[weight_name]
except KeyError: