def type_stats(data, focus):
    """
    Return a DataFrame or a dict of DataFrames for global type stats.
    Helper function for speeding up analysis.
    """
    if focus.lower() == 'global':
        return data.sum(axis=0)
    elif focus.lower() == 'user':
        users_stats = {}
        for i in data:
            users_stats[i] = data[i].sum(axis=0)
    else:
        return data.sum(axis=0)
