如何分析一个公众号数据?以抓取记忆承载的阅读数点赞数在看数留言数为例
之前分享过文章:
一键批量下载微信公众号文章内容/图片/封面/视频/音频,支持导出html和pdf格式,包含阅读数/点赞数/在看数

于是顺便研究下记忆承载,这里抓取了他2021年的所有文章,我放博客上了,方便在线查看:
如何分析一个公众号的数据,以记忆承载/深圳卫健委的阅读数点赞数在看数/留言数为例

苏生不惑的博客

excel文件包含文章标题,日期,链接,封面图,阅读数,在看数和点赞数:

第一篇文章:
我力挺郭敬明先生
接下来用python分析这个号的数据:
wechat=pd.read_csv('2021记忆承载公众号历史文章列表.csv',encoding='utf-8')
文章数量331篇
len(wechat)
文章作者前5,看数据都是碧树西风一个人。
>>> wechat.文章作者.value_counts().sort_values(ascending=False).head(5) 碧树西风 331 Name: 文章作者, dtype: int64
10万+文章只有一篇:
阿里P7闹出的这点事儿

>>> wechat[wechat.阅读数>100000] 文章日期 文章标题 文章链接 ... 阅读数 在 看数 点赞数 139 2021-08-08 xxx ... 100001 825 1742 [1 rows x 12 columns]
阅读数总数8191166
>>> wechat.阅读数.sum() 8191166
阅读数排行前10的文章
>>> wechat[['文章日期','文章标题','文章链接','阅读数']].sort_values(by='阅读数', ascending=False).head(10)

阅读数点赞数在看数平均值
>>> wechat[['阅读数','点赞数','在看数']].mean() 阅读数 24746.725076 点赞数 622.480363 在看数 260.145015 dtype: float64
头条的阅读数点赞数在看数平均值
>>> wechat[wechat.文章位置 == 1][['阅读数','点赞数','在看数']].mean() 阅读数 28413.407407 点赞数 667.126984 在看数 276.148148 dtype: float64
头条和次条数分别为189和142:
wechat.groupby('文章位置',as_index=False).agg({"在看数":'count'}).sort_values(by=['在看数'],ascending=False).head(5) >>> wechat.文章位置.value_counts().sort_values(ascending=False).head(5) 1 189 2 142 Name: 文章位置, dtype: int64 wechat.query('文章位置 == 2')
原创文章331篇,比例100%
wechat.groupby('是否原创')['在看数'].count().sort_values(ascending=False).head(5) wechat.groupby('是否原创').agg({"在看数":'count'}).sort_values(by=['在看数'],ascending=False).head(5) >>> wechat.是否原创.value_counts().sort_values(ascending=False).head(5) 是 331 Name: 是否原创, dtype: int64
有原文链接数的文章为0
>>> wechat[wechat["原文链接"].notnull()] Empty DataFrame
上半年和下半年文章数
date='2021-07-01' >>> len(wechat.query(f'文章日期 > "{date}"')) 173