def extreme_obs_table(freqtable, number_to_print, n, ascending=True) ->list:
    """Similar to the frequency table, for extreme observations.

    Args:
      freqtable: The frequency table.
      number_to_print: The number of observations to print.
      n: The total number of observations.
      ascending: The ordering of the observations (Default value = True)

    Returns:
        The HTML rendering of the extreme observation table.
    """
    if 'mixed' in freqtable.index.inferred_type:
        freqtable.index = freqtable.index.astype(str)
    sorted_freqtable = freqtable.sort_index(ascending=ascending)
    obs_to_print = sorted_freqtable.iloc[:number_to_print]
    max_freq = max(obs_to_print.values)
    rows = []
    for label, freq in obs_to_print.items():
        rows.append({'label': label, 'width': freq / max_freq if max_freq !=
            0 else 0, 'count': freq, 'percentage': float(freq) / n,
            'extra_class': '', 'n': n})
    return rows
