code: def mad(a, c=0.6745, axis: int = 0):
      """Median Absolute Deviation along given axis of an array
  
      mad = median(abs(a - median(a)))/c
  
      Copyright statsmodels:
      Kindly taken from statsmodels package and then modified to work with dataframes as well.
      Reference: https://www.statsmodels.org/dev/_modules/statsmodels/robust/scale.html#mad
      License: https://github.com/statsmodels/statsmodels/blob/master/LICENSE.txt
      All modifications copyright INGA WB.
  
      :param a: array_like Input array.
      :param float c: optional. The normalization constant. Defined as scipy.stats.norm.ppf(3/4.),
          which is approximately .6745.
      :param int axis: optional. The default is 0. Can also be None.
      :param center: callable or float. If a callable is provided, such as the default `np.median` then it
          is expected to be called center(a). The axis argument will be applied
          via np.apply_over_axes. Otherwise, provide a float.
      :return: mad
      :rtype: float
      """
      if isinstance(a, pd.DataFrame):
          a = a.select_dtypes([np.number]).dropna(axis=1, how="all")
  
      center = a.median(axis=axis)
      rel_abs_diff = (a - center).abs() / c
      mad = rel_abs_diff.median(axis=axis)
      return mad
  
file_path: popmon/popmon/stats/numpy.py
imports: import numpy
  import pandas
label_desc: Use image node_id 7 for calling a global function with example usage: mad(a, c, axis) and returns: mad