使用matplotlib画图
导入模块
import matplotlib.pyplot as plt
%matplotlib inline
plt.pie(pie_fig['count'],labels=pie_fig['type'],explode=[0.1,0],data=pie_fig,shadow=True,autopct='%1.1f%%')
plt.title('Netflix_show TV/Moive percentage')
plt.axis('equal')
plt.show()
传入数据pie_fig为dataframe格式
图形结果: