def value_counts(arg, metric_name='count'):
    base = ir.find_base_table(arg)
    metric = base.count().name(metric_name)

    try:
        arg.get_name()
    except _com.ExpressionError:
        arg = arg.name('unnamed')

    return base.group_by(arg).aggregate(metric)
Compute a frequency table for this value expression
dataset/ETHPy150Open cloudera/ibis/ibis/expr/api.py/value_counts