analysing.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:crawllagou 作者: ScarecrowFu 项目源码 文件源码
def get_city_phase():
    city_pahse = pd.crosstab(frame.city,frame.phase,margins=True).sort_values(by='All',ascending=False)[:11]
    city_pahse = city_pahse.drop('All',axis=0).drop('All',axis=1)
    funnel_chart = pygal.StackedBar()
    funnel_chart.title = u'??????????????'
    funnel_chart.x_labels = city_pahse.index
    for i in range(len(list(city_pahse.T.index))):
        funnel_chart.add(city_pahse.T.index[i], city_pahse.T.values[i])
    funnel_chart.render_to_file(os.path.dirname(__file__)+'/chart/phase.svg')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号