bug fixes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user