数据分析-38-关于互联网企业黑名单的探索

论文辅导算法学习可以滴滴我


文章目录

项目介绍

在数字化的时代,信息的力量不言而喻,尤其当我们面临职业选择时。是一个开放源代码项目,旨在收集并分享全球范围内存在争议或不良工作环境的IT公司名单,帮助求职者做出更为明智的职业决策。

表和字典描述

该数据集互联网企业黑名单.csv,一共有839条。

8个字段,分别是:公司名字评论链接存在问题详细描述所在城市发布时间评论数浏览数

表数据如下:

1、读取数据

python 复制代码
import pandas as pd
import numpy as np
from warnings import filterwarnings
filterwarnings('ignore')
python 复制代码
df1 = pd.read_csv(r'互联网企业黑名单.csv')

查看数据的行数和列数

python 复制代码
df1.shape

(838, 8)

查看数据的列名

python 复制代码
df1.columns
python 复制代码
# 提取浏览次数
import re
df1['浏览数_d'] = df1['浏览数'].apply(lambda x : re.findall(r'\d+',x)[0])
python 复制代码
print('黑名单上共有 {}家公司'.format(df1['公司名字'].nunique()))
print('数据日期从 {} 至 {}'.format(df1['发布时间'].min(),df1['发布时间'].max()))
print('黑榜公司共来自全国 {} 个城市'.format(df1['所在城市'].nunique()))
print('浏览次数最多的公司是:\n{}'.format(df1[df1['浏览数_d']==df1['浏览数_d'].max()].公司名字.tolist()))

2、查看黑名单公司主要来自哪些城市

python 复制代码
from pyecharts.charts import Bar,Grid,Map
from pyecharts.commons.utils import JsCode
from pyecharts import options as opts
from pyecharts.globals import SymbolType
python 复制代码
df1['所在城市'].fillna('城都市',inplace = True)
python 复制代码
result = df1['所在城市'].value_counts().reset_index(name = '公司数量')
result['index'] = result['index'].str.replace('市','')
x_data = result['index'].tolist()
y_data = result['公司数量'].tolist()

bar = (
    Bar()
    .add_xaxis(x_data)
    .add_yaxis("", y_data)
    .set_global_opts(
        xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=65)),
        title_opts=opts.TitleOpts(title="黑名单公司主要来自哪些城市"),
    )
    .set_series_opts(
        itemstyle_opts={
            "normal": {
                "color": JsCode(
                    """new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                offset: 0,
                color: 'rgba(131, 96, 195, 1)'
            }, {
                offset: 1,
                color: 'rgba(46, 191, 195, 1)'
            }], false)"""
                ),
                "barBorderRadius": [30, 30, 1, 1],
                "shadowColor": "rgb(0, 160, 221)",
            }
        }
    )
)
bar.render_notebook()

3、查看黑榜公司分布城市

python 复制代码
# 地图
map1 = Map()
map1.add('',[list(z) for z in zip(x_data, y_data)],
         maptype='china-cities',is_map_symbol_show=False,
        ) 
map1.set_series_opts(label_opts=opts.LabelOpts(is_show=False))
map1.set_global_opts(title_opts=opts.TitleOpts(title='黑榜公司分布城市'),
                     visualmap_opts=opts.VisualMapOpts( max_=df1['所在城市'].value_counts().max(),
                                                       is_piecewise=False,range_color=['#12c2e9','#c471ed','#f64f59']
                                                  ),
                    )

map1.render_notebook()

4、存在的问题

python 复制代码
df1['存在问题'] = df1['存在问题'].str.replace('1.单休','单休').str.replace('2.习惯性拖技术部工资','习惯性拖技术部工资').str.replace('3.老板脾气爆','老板脾气爆')
ls = [',',',',';',' ']
for s in ls:
    df1['存在问题'] = df1['存在问题'].str.replace(s,'/')
python 复制代码
from collections import Counter
cause = df1['存在问题'].tolist()
lst = []
lit = []
for s in cause:
    s = s.split('/')
    lst.append(s)
    for x in s:
        lit.append(x)
python 复制代码
cause_ct = Counter(lit)

data_c = pd.DataFrame.from_dict(cause_ct,orient='index').reset_index()
data_c.columns = ['存在问题','出现次数']
data_c.sort_values('出现次数',ascending = False,inplace = True)
python 复制代码
from pyecharts.charts import WordCloud

x_data = data_c['存在问题'].tolist()
y_data = data_c['出现次数'].tolist()

(
    WordCloud()
    .add(" ", [list(z) for z in zip(x_data, y_data)])
    .set_global_opts(
        title_opts=opts.TitleOpts(
            title="存在的问题", title_textstyle_opts=opts.TextStyleOpts(font_size=23)
        ),
        tooltip_opts=opts.TooltipOpts(is_show=True),
    )
).render_notebook()

由于996 ,007 ,9107等都是上班时长,实际是加班问题,对此类标签统一做个大的分类再进行统计

5、查看存在问题分类

python 复制代码
data_n = pd.DataFrame(lit,columns = ['问题标签'])

def frame(x):
    if "996" in x or "工作时间9/6" in x:
        return "996"
    elif "995" in x:
        return "995"
    elif "897" in x:
        return "897"
    elif "单休" in x:
        return "单休"
    elif "9107" in x:
        return "9107"
    elif "9116" in x:
        return "9116"
    elif "007" in x:
        return "007"
    elif "加班" in x:
        return "加班"
    elif "福利差" in x :
        return "福利差"
    elif "社保" in x or "不交五险" in x  or "五险不交" in x:
        return "社保问题"
    elif "薪" in x or "工资" in x or "赖账"in x or "坑钱" in x:
        return "拖欠工资"
    elif "老板" in x or "领导" in x or "管理" in x or "高层" in x:
        return "领导问题"
    elif "画饼" in x or "画大饼" in x or "忽悠" in x or "洗脑" in x:
        return "画饼"
    elif "裁员"in x or "过河拆桥"in x or "辞退" in x:
        return "裁员"
    else:
        return x

data_n['问题分类'] = data_n['问题标签'].apply(lambda x : frame(x))
python 复制代码
data_n['问题大类'] = data_n['问题分类'].apply(lambda x : "加班问题" if "996" in x or "工作时间9/6" in x or "995" in x
or "897" in x or "9107" in x or "9116" in x or "007" in x or "加班" in x else x)
python 复制代码
x_data = data_n['问题大类'].value_counts().index.tolist()
y_data = data_n['问题大类'].value_counts().values.tolist()

(
    WordCloud()
    .add(" ", [list(z) for z in zip(x_data, y_data)],word_size_range=[20, 100], shape=SymbolType.DIAMOND)
    .set_global_opts(
        title_opts=opts.TitleOpts(
            title="分类-存在的问题", title_textstyle_opts=opts.TextStyleOpts(font_size=23)
        ),
        tooltip_opts=opts.TooltipOpts(is_show=True),
    )
).render_notebook()

黑榜公司上榜除了是因为"网传黑名单"以及"单位性质培训"等两个原因外,大家最不能接受的原因是"拖欠工资"以及"加班问题"

相关推荐
谙忆102412 小时前
图片放大为什么会糊?从插值到AI超分,超分辨率技术是怎么演进的
人工智能·计算机视觉
Lx35213 小时前
成了!不会前端,花一天时间给公司 BI 系统装上了 AI 智能体!
数据分析·agent·数据可视化
是Dream呀14 小时前
基于深度学习的人类行为识别算法研究
人工智能·深度学习·算法
人工智能培训14 小时前
破解数据发展瓶颈 激活数字经济新动能
大数据·数据库·人工智能·深度学习·神经网络·机器学习·生成对抗网络
绝世番茄14 小时前
鸿蒙 HarmonyOS ArkTS 音乐播放器界面布局深度学习指南
深度学习·华为·list·harmonyos·鸿蒙
happyprince14 小时前
03_NVIDIA_ModelOpt-量化算法深入
人工智能·深度学习·算法
大鱼>15 小时前
AI+货物追踪:智能快递柜追踪系统
人工智能·深度学习·算法·机器学习
程序喵大人15 小时前
【AI专栏】图解Transformer - 第04章:LLM生成
人工智能·深度学习·llm·transformer
数智工坊15 小时前
视图集合化+轻量Transformer:VSFormer开启多视图3D形状理解新范式
深度学习·3d·transformer
yyywxk15 小时前
ICML 2026 超分辨率(super-resolution)方向上接收论文总结
计算机视觉·icml·超分辨率