def _aggr_mean(inList):
 aggrSum = 0
 nonNone = 0
 for elem in inList:
  if (elem != SENTINEL_VALUE_FOR_MISSING_DATA):
   aggrSum += elem
   nonNone += 1
 if (nonNone != 0):
  return (aggrSum / nonNone)
 else:
  return None

def _aggr_mean ( inList ) : aggrSum = 0 nonNone = 0 for elem in inList : if ( elem != SENTINEL_VALUE_FOR_MISSING_DATA ) : aggrSum += elem nonNone += 1 if ( nonNone != 0 ) : return ( aggrSum / nonNone ) else : return None
returns mean of non-none elements of the list .