code: def transform(table, option, mode):
      
      if option != 'rows' and option != 'columns' and option != 'table':
          print('# specify: rows, columns, or table', file=sys.stderr)
          exit()
      if option == 'columns':
          table = transpose(table)
      if mode == '0':
          transformed = zero_to_one(table, option)
      elif mode == 'pertotal':
          transformed = pertotal(table, option)
      elif mode == 'stand':
          transformed = standardize(table, option)
      elif mode == 'scale':
          if option != 'table':
              print('# scaling is done on an entire table, based on the column with the largest sum - use table', file=sys.stderr)
              exit()
          transformed = scale(table)
      elif mode == 'log':
          if option != 'table':
              print('# scaling is done on a per-value basis - use table', file=sys.stderr)
              exit()
          transformed = log_trans(table)
      elif mode == 'box':
          transformed = box_cox(table)
      elif mode == 'inh':
          transformed = inh(table)
      elif mode == 'norm':
          transformed = norm(table)
      elif mode == 'diri':
          transformed = diri(table)
      else:
          print('# specify: 0 (for 0-1), pertotal (for percent of total), stand (for standardize), scale (scale table to largest column), norm (fit to normal distribution), log (log10(x+1)-transform), box (box-cox), inh (inverse hyperbolic sine), diri (Dirichlet distribution)', file=sys.stderr)
          exit()
      if option == 'columns':
          transformed = transpose(transformed)
      return transformed
docs: transform data table:
      option:
          rows
          columns
          table
      mode:
          0: 0-1
          pertotal: percent of total
          stand: standardize
          scale: scale based on largest column