summary_stats.py 文件源码

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

项目:fake_news 作者: bmassman 项目源码 文件源码
def show_articles_by_source(articles: pd.DataFrame):
    """Show boxplot comparing articles by source for fake and true news."""
    by_source = (articles.groupby(['base_url', 'labels'])
                         .size()
                         .reset_index(name='count'))
    by_source = by_source[by_source['count'] > 100]
    sns.boxplot(x='labels', y='count', data=by_source)
    sns.plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号