拉钩网数据分析

import pandas as pd
import matplotlib.pyplot as plt
from pyecharts import Bar, Geo, Map, Pie

df = pd.read_csv("lagou.csv", usecols=['city', 'education', 'salary'])

plt.rcParams['font.sans-serif'] = ['simhei']  # 中文
"""
df['city'].value_counts()[:7].plot(kind='barh')  # 绘制条形图
# df['education'].value_counts()[:7].plot(kind='barh')  # 绘制条形图
# df['salary'].value_counts()[:7].plot(kind='barh')  # 绘制条形图

# df['city'].value_counts()[:7].plot(kind='pie', autopct='%1.2f%%')  # 绘制饼图
# df['education'].value_counts()[:7].plot(kind='pie', autopct='%1.2f%%')  # 绘制饼图
# df['salary'].value_counts()[:7].plot(kind='pie', autopct='%1.2f%%')  # 绘制饼图
plt.show()
"""

"""
city = df['city'].value_counts()
explode = [x * 0.04 for x in range(len(city))]
city.plot(kind='pie',
          explode=explode,  # 爆炸
          autopct='%3.2f %%',  # 百分比显示
          pctdistance=0.6,  # 百分比距圆心的位置
          labeldistance=1.2,  # 距圆心的距离
          counterclock=True,  # 顺时针
          radius=0.5,  # 半径的大小
          startangle=-5,  # 自定义第一块饼图和水平面的角度
          rotatelabels=True,  # 旋转每个label到指定的角度
          textprops={'fontsize': 8}
          )  # 绘制条形图
plt.axis('equal')
plt.show()
"""

"""
salary = df['salary'].value_counts()[:7]
bar = Bar("Python岗位薪水分布图")
bar.add("薪水", salary.index, salary.values)
bar.render("Python岗位薪水分布图.html")
"""

"""
city = df['city'].value_counts()[:7]
bar = Bar("Python岗位城市分布图")
bar.add("城市", city.index, city.values)
bar.render("Python岗位城市分布图.html")
"""

"""
education = df['education'].value_counts()[:7]
bar = Bar("Python岗位学历分布图")
bar.add("学历", education.index, education.values)
bar.render("Python岗位学历分布图.html")
"""

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

迷心兔

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值