key_word = ['1糖','0糖','3糖','开心就好','点赞关注']
ind = '|'.join(key_word)
data[data['weibo_content'].str.contains(ind)]
python中的dataframe格式筛选字符串或含有多个值的方法
最新推荐文章于 2025-02-14 08:18:49 发布
key_word = ['1糖','0糖','3糖','开心就好','点赞关注']
ind = '|'.join(key_word)
data[data['weibo_content'].str.contains(ind)]