这是我的数据集。
Country Type Disaster Count
0 CHINA P REP Industrial Accident 415
1 CHINA P REP Transport Accident 231
2 CHINA P REP Flood 175
3 INDIA Transport Accident 425
4 INDIA Flood 206
5 INDIA Storm 121
6 UNITED STATES Storm 348
7 UNITED STATES Transport Accident 159
8 UNITED STATES Flood 92
9 PHILIPPINES Storm 249
10 PHILIPPINES Transport Accident 84
11 PHILIPPINES Flood 71
12 INDONESIA Transport Accident 136
13 INDONESIA Flood 110
14 INDONESIA Seismic Activity 77
我想制作一个三重条形图,标签基于“类型”列。我还想根据“国家”列对酒吧进行分组。
我尝试使用(以df作为熊猫库的DataFrame对象),
df.groupby('Country').plot.bar()
,但结果显示为“国家”列中代表每个组的多个条形图。
要获得此图表,我需要运行哪些代码?