def test_valuecounts_multifields():

    table = (('foo', 'bar', 'baz'),
             ('a', True, .12),
             ('a', True, .17),
             ('b', False, .34),
             ('b', False, .44),
             ('b',),
             ('b', False, .56))
    actual = valuecounts(table, 'foo', 'bar')
    expect = (('foo', 'bar', 'count', 'frequency'),
              ('b', False, 3, 3./6),
              ('a', True, 2, 2./6),
              ('b', None, 1, 1./6))
    ieq(expect, actual)
    ieq(expect, actual)
dataset/ETHPy150Open alimanfoo/petl/petl/test/util/test_counting.py/test_valuecounts_multifields/original