pandas boolean array calculating the average of two columns based on a filter or a 3rd column
By Edmund Walsh at Apr 25 2021