code: def mean(series):
      
  
      if np.issubdtype(series.dtype, np.number):
          return series.mean()
      else:
          return np.nan
docs: Returns the mean of a series.
  
      Args:
          series (pandas.Series): column to summarize.