这是我现在拥有的:
np.random.seed(1234)
test = pd.DataFrame({'week': [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2],
'score': np.random.uniform(0, 1, 12),
'type': [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
'type2': [3, 3, 4, 4, 5, 5, 3, 3, 4, 4, 5, 5]})
test.groupby(['week', 'type', 'type2']).agg('sum').unstack().plot(kind='bar')
如何根据"type"绘制不同的面板?我想要两个不同的图,一个针对type = 1,另一个针对type = 2。