def nanmean(values, axis=None, skipna=True):
    values, mask, dtype, dtype_max = _get_values(values, skipna, 0)
Why does a pandas Series of DataFrame mean fail, but sum does not, and how to make it work