cdf = df[['rank', 'name', 'variable', 'value']].groupby(['rank', 'variable',
    'name']).agg('count')
sns.factorplot(x='rank', y='value', row='variable', hue='name', data=cdf.
    reset_index(), kind='bar')
pandas plot with different variable for subplots and colour?