Compute summary statistics of a categorical (`TYPE_CAT`) variable (a Series).

    Parameters
    ----------
    series : Series
        The variable to describe.

    Returns
    -------
    Series
        The description of the variable as a Series with index being stats keys.

def describe_categorical_1d(series):
    """Compute summary statistics of a categorical (`TYPE_CAT`) variable (a Series).

    Parameters
    ----------
    series : Series
        The variable to describe.

    Returns
    -------
    Series
        The description of the variable as a Series with index being stats keys.
    """
    # Only run if at least 1 non-missing value
    value_counts, distinct_count = base.get_groupby_statistic(series)
    top, freq = value_counts.index[0], value_counts.iloc[0]
    names = []
    result = []

    if base.get_vartype(series) == base.TYPE_CAT:
        names += ['top', 'freq', 'type']
        result += [top, freq, base.TYPE_CAT]

    return pd.Series(result, index=names, name=series.name)