2017-05-29 68 views

回答

1

您可以使用DataFrame.plot.pie與轉由數據幀T

df = pd.DataFrame({'beer':[1,2,3], 
        'spirit':[4,5,6], 
        'wine':[7,8,9]}, index=['Africa','Asia','Europe']) 

print (df) 
     beer spirit wine 
Africa  1  4  7 
Asia  2  5  8 
Europe  3  6  9 

df.T.plot.pie(subplots=True, figsize=(10, 3)) 

graph