def printsigdiffs(agg2):
    """Print significant differences in aggregated data for two summary
    data frames.
    """
    Xwinner = sum(agg2['XlessY'] > agg2['YlessX'])
    Ywinner = sum(agg2['XlessY'] < agg2['YlessX'])
    gr = agg2['XlessY'].size
    print('X is yielding more frequently better results on ', Xwinner,
        ' groups (', round(Xwinner / gr * 100, 2), '%)')
    print('Y is yielding more frequently better results on ', Ywinner,
        ' groups (', round(Ywinner / gr * 100, 2), '%)')
    print('\nSignificant differences:')
    sigXlessY = agg2[agg2.p_XlessY <= 0.05]
    sigYlessX = agg2[agg2.p_YlessX <= 0.05]
    if not sigXlessY.empty:
        print('\np_XlessY<=0.05\n', sigXlessY)
    if not sigYlessX.empty:
        print('\np_YlessX<=0.05\n', sigYlessX)
