code: def mean(data):
      """Substitute missing values with the mean of that column.
  
      Parameters
      ----------
      data: numpy.ndarray
          Data to impute.
  
      Returns
      -------
      numpy.ndarray
          Imputed data.
  
      """
      nan_xy = matrix.nan_indices(data)
      for x_i, y_i in nan_xy:
          row_wo_nan = data[:, [y_i]][~np.isnan(data[:, [y_i]])]
          new_value = np.mean(row_wo_nan)
          data[x_i][y_i] = new_value
      return data
  
imports: import numpy
  from impyute.ops import matrix
  from impyute.ops import wrapper
label_desc: Use image node_id 1 for calling a global function with example usage: mean(data) and returns: data