def compute_mean(serie):
    """
    Compute mean of a serie
    """
    clean_serie = serie.dropna()
    length = len(clean_serie)
    acc = 0.0
    try:
        for _, value in clean_serie.iteritems():
            acc += value
    except TypeError:
        return (float('NaN'))
    finally:
        return (acc / length)