【发布时间】:2019-01-06 16:14:18
【问题描述】:
如果数据如下:如何为每一行逐行绘制数据表示:
Name Maths Science
John 87 78
Marry 76 68
Harry 98 94
在这里,我想得到每个人在考试行中表现的饼图。
此代码只为第一行绘制饼图,如何获取每行的饼图?
fig, ax = plt.subplots(1,1)
df.iloc[0].plot(kind='pie', subplots=True, autopct='%1.1f%%')
【问题讨论】:
-
你运行的是什么python版本?
-
python 2.7 @Yuca
标签: python pandas matplotlib