analysing.py 文件源码

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

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


问题


面经


文章

微信
公众号

扫码关注公众号