d1 = pd.DataFrame(dict(year=np.random.choice((2014, 2015, 2016), 100),
    cntry=['United States' for _ in range(100)], State=np.random.choice(
    states, 100), Col1=np.random.randint(0, 20, 100), Col2=np.random.
    randint(0, 20, 100), Col3=np.random.randint(0, 20, 100)))
df = d1.groupby(['year', 'cntry', 'State']).agg(['size', 'sum'])
df
pandas: create single size & sum columns after group by multiple columns