不知道周四的芒果台《披荆斩棘的哥哥》第1期一经播出,你们看了没。简直炸裂来袭,情怀牌、不油腻、有质感,让它上线就获得了大量关注!
将古惑仔、摇滚乐手、rapper、舞者、歌手、功夫演员等等放在同一档综艺节目里,又会产生什么样的化学反应呢?
今天,我们就看看第1期里10万弹幕大军们怎么说吧!
1. 数据预览
本次采集的是芒果TV第1期上中下三集一共97,331
条弹幕,具体采集过程见文末代码(比较简单哈)。
import pandas as pd df = pd.read_excel('披荆斩棘的哥哥.xlsx') # 数据字段信息 df.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 97331 entries, 4 to 33794 Data columns (total 7 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 ids 97331 non-null string 1 uid 97331 non-null Int64 2 content 97331 non-null string 3 time 97331 non-null Int64 4 v2_up_count 97331 non-null Int64 5 时间 97331 non-null Int64 6 上中下 97331 non-null string dtypes: Int64(4), string(3) memory usage: 6.3 MB
在数据中,各字段含义如下:
ids
: 弹幕id
uid
: 用户id
content
:弹幕内容
time
:弹幕发送时间(相对于本集开始后的毫秒)
v2_up_count
:弹幕点赞数时间:弹幕发送时间(分钟)
上中下:归属第1期的上中下三部分之一
# 数据预览 df.sort_values(by=['上中下','time'], inplace=True) # 按照上中下集和time排序 df.head() 复制代码
( df.groupby('上中下').agg(弹幕数=('ids', 'count'), 时长=('时间', &