【数据可视化】数据分析岗位招聘分析
<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 10px; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; font-family: Optima, 'Microsoft YaHei', PingFangSC-regular, serif; font-size: 16px; color: rgb(0, 0, 0); line-height: 1.5em; word-spacing: 0em; letter-spacing: 0em; word-break: break-word; overflow-wrap: break-word; text-align: left;"><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">在数字化时代,数据分析已成为各行各业不可或缺的重要技能。为了深入了解当前市场对数据分析师岗位的需求情况,我们从BOSS直聘平台上爬取了一份关于数据分析师招聘信息的数据集。本博客将通过对这份数据进行可视化分析,揭示数据分析师岗位的地域分布、薪资水平、经验要求、学历要求以及技能标签等关键信息,帮助求职者更好地把握市场动态,制定职业规划。</p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">一、数据集简介</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">本次分析的数据集包含了以下字段:</p>
<ul data-tool="mdnice编辑器" style="list-style-type: disc; margin-top: 8px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 25px; padding-right: 0px; color: rgb(0, 0, 0);">
<li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">company</strong>:公司名称</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">job_position</strong>:岗位名称</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">job_address</strong>:工作地点</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">job_salary</strong>:薪资范围</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">job_exper</strong>:经验要求及学历</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">company_type</strong>:经验要求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;"><strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">tags</strong>:技能标签</section></li></ul>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">二、数据预处理</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">在正式分析之前,我们加载数据集并进行了预处理,具体流程如下:</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">2.1 加载分析需要的库</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> numpy <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">as</span> np<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> pandas <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">as</span> pd<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> seaborn <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">as</span> sns<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> matplotlib.pyplot <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">as</span> plt<br><br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> warnings<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">from</span> scipy.stats <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> norm,mode<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> re<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">from</span> collections <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> Counter<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> pyecharts.options <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">as</span> opts<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">from</span> pyecharts.charts <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">import</span> WordCloud<br><br>plt.rcParams[<span class="hljs-string" style="color: #98c379; line-height: 26px;">'font.sans-serif'</span>] = [<span class="hljs-string" style="color: #98c379; line-height: 26px;">"SimHei"</span>]<br>plt.rcParams[<span class="hljs-string" style="color: #98c379; line-height: 26px;">'axes.unicode_minus'</span>] = <span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">False</span><br></code></pre>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">2.2 导入数据</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">#导入数据</span><br>df = pd.read_csv(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"boss.csv"</span>,header=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">None</span>)<br>df.columns = [<span class="hljs-string" style="color: #98c379; line-height: 26px;">'company'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_position'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_address'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_salary'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_exper'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'company_type'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'tags'</span>]<br>df.head()<br>df.info()<br></code></pre>
<figure data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; display: flex; flex-direction: column; justify-content: center; align-items: center;"><img src="https://files.mdnice.com/user/84866/40f0ae2b-8e4e-4f27-aa69-78a587af7577.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; object-fit: fill; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></figure>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/97afc921-1ac0-4e06-9883-671f7c94a1b1.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
数据一共有7个维度,2537条招聘记录,而且数据中无缺失值的存在。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">2.3 数据清洗</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<ul data-tool="mdnice编辑器" style="list-style-type: disc; margin-top: 8px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 25px; padding-right: 0px; color: rgb(0, 0, 0);">
<li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">首先把工作<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">job_exper</strong>:经验要求及学历,拆分成工作经验<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">experience</strong>和学历<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">diploma</strong>字段;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">对数据进行去重;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">计算各城市薪资均值</section></li></ul>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;">df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>]=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"job_exper"</span>].str.extract(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"^(\d+/?-\d+)"</span>)<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"diploma"</span>]=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"job_exper"</span>].str[<span class="hljs-number" style="color: #d19a66; line-height: 26px;">-2</span>:]<br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">#去重</span><br>df.duplicated().sum()<br><br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].replace(np.nan,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"经验不限"</span>,inplace=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>)<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].replace(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"1-3"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"1-3年"</span>,inplace=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>)<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].replace(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"3-5"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"3-5年"</span>,inplace=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>)<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].replace(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"5-10"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"5-10年"</span>,inplace=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>)<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].unique()<br></code></pre>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">#计算各城市薪资均值</span><br><span class="hljs-function" style="line-height: 26px;"><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">def</span> <span class="hljs-title" style="color: #61aeee; line-height: 26px;">avg_ar</span><span class="hljs-params" style="line-height: 26px;">(x)</span>:</span><br> <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">if</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">"-"</span> <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> x:<br> a,b=x.split(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"-"</span>)<br> <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">return</span> (int(a)+int(b))/<span class="hljs-number" style="color: #d19a66; line-height: 26px;">2</span><br> <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">else</span>:<br> <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">return</span> <span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">None</span> <br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"job_salary"</span>].apply(<span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">lambda</span> x: re.split(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"K|元"</span>,x)[<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0</span>])<br>df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>].apply(<span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">lambda</span> x: avg_ar(x))<br>df.head()<br></code></pre>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">三、可视化分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">为了进行这些可视化分析,我们将使用Python及其相关库(如pandas、matplotlib、seaborn等)来处理和分析数据。以下是一个详细的步骤指南和相应的Python代码示例。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.1 各个城市数据分析岗位招聘数量情况</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用matplotlib或seaborn来绘制各个城市数据分析岗位招聘数量情况。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;">city_job_num = df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_address'</span>].value_counts().reset_index()<br>city_job_num.columns = [<span class="hljs-string" style="color: #98c379; line-height: 26px;">'city'</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_nums'</span>]<br>sns.barplot(x=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'city'</span>, y=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_nums'</span>, data=city_job_num)<br>plt.xticks(rotation=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">45</span>) <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 旋转x轴标签以便阅读</span><br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">'各城市数据分析师招聘数量情况'</span>)<br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/01f339b1-de31-4af0-8da8-abb099d51436.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从图中我们可以知道,<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">南京</strong>发布的数据分析招聘信息数量最多;</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.2 数据分析师在各城市薪资水平情况</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用matplotlib或seaborn来绘制薪资水平的柱状图。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 按城市分组并计算平均薪资</span><br>city_salaries = df.groupby(<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_address'</span>)[<span class="hljs-string" style="color: #98c379; line-height: 26px;">'avg_address'</span>].mean().reset_index()<br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 绘制薪资水平的地图(需要额外的地理数据,这里使用柱状图作为替代)</span><br>sns.barplot(x=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'job_address'</span>, y=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'avg_address'</span>, data=city_salaries)<br>plt.xticks(rotation=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">45</span>) <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 旋转x轴标签以便阅读</span><br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">'数据分析师在各城市薪资水平情况'</span>)<br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/3ea4d64f-13ab-425d-9eb7-269191a63c06.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从图中我们可以知道,<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">北京、杭州、上海、深圳</strong>发布的数据分析招聘信息薪资最高;</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.3 薪资和城市分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们已经计算了各城市的在一定范围内的薪资占比情况;</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 薪资和城市</span><br>fig=plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">10</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">5</span>),dpi=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">100</span>)<br>plt.subplot(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">121</span>)<br>temp=df.groupby(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"job_address"</span>).avg_address.count()<br>temp=pd.DataFrame(temp).sort_values(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>).iloc[<span class="hljs-number" style="color: #d19a66; line-height: 26px;">-8</span>:]<br>plt.pie(temp[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>],labels=temp.index,autopct=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"%.2f%%"</span>)<br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"薪资小于10K的城市占比"</span>)<br>plt.subplot(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">122</span>)<br>temp=df.groupby(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"job_address"</span>).avg_address.count()<br>temp=pd.DataFrame(temp).sort_values(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>).iloc[<span class="hljs-number" style="color: #d19a66; line-height: 26px;">-8</span>:]<br>plt.pie(temp[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>],labels=temp.index,autopct=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"%.2f%%"</span>)<br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"薪资大于10K的城市占比"</span>)<br><br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/d320dcf6-6102-42bb-ad5a-1af192f1ab39.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从上图可以看出,在薪资小于10k的城市占比中南京和武汉发布的招聘最高,在薪资大于10k的城市占比中北京和杭州发布的招聘信息最多。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.4 热门城市薪资箱线图</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以选择几个热门城市,并绘制它们的薪资箱线图。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 热门城市薪资箱线图</span><br>df1=df<<span class="hljs-number" style="color: #d19a66; line-height: 26px;">100</span>]<br>data1=df1[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]<br>data2=df1[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]<br>data3=df1[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]<br>data4=df1[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]<br>data5=df1[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>]<br>plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>))<br>plt.boxplot(,<br> labels=[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"北京"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"上海"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"广州"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"深圳"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"杭州"</span>],<br> flierprops={<span class="hljs-string" style="color: #98c379; line-height: 26px;">"marker"</span>:<span class="hljs-string" style="color: #98c379; line-height: 26px;">"o"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"markerfacecolor"</span>:<span class="hljs-string" style="color: #98c379; line-height: 26px;">"r"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"color"</span>:<span class="hljs-string" style="color: #98c379; line-height: 26px;">"k"</span>},<br> patch_artist=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>,<br> boxprops={<span class="hljs-string" style="color: #98c379; line-height: 26px;">"color"</span>:<span class="hljs-string" style="color: #98c379; line-height: 26px;">"k"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"facecolor"</span>:<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#FFFACD"</span>})<br>ax=plt.gca()<br>ax.patch.set_facecolor(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#FFFAFA"</span>)<br>ax.patch.set_alpha(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0.8</span>)<br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"主要城市薪资水平箱线图"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">15</span>)<br>plt.ylabel(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"薪资(单位:K)"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br><br>plt.show()<br></code></pre>
<figure data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; display: flex; flex-direction: column; justify-content: center; align-items: center;"><img src="https://files.mdnice.com/user/84866/81edd6a0-1836-4da8-a320-9c9713e1f901.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; object-fit: fill; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></figure>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">从上图中可以看出,几个主要的热门城市发布的招聘信息来看,平均薪资最高的是<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">北京</strong>,最低的是<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">广州</strong>,杭州的高工资和低工资都比较多,求职者的可能性更大,发展机遇就好,<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">努力奋斗</strong>;</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.5 学历与薪资数据分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用条形图来展示不同学历的薪资分布。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 学历与薪资数据分析</span><br>d=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>].groupby(df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"diploma"</span>])<br>d_avg = d.mean()<br>c=list(d_avg.index)<br>v=list(range(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,len(c)+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>))<br>w=d_avg.values.astype(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"int64"</span>)<br>x=d.median().values.astype(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"int64"</span>)<br>move=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0.4</span><br><br>plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">5</span>))<br>plt.bar(v,w,width=move,color=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#eed777"</span>)<br>plt.bar(,x,width=move,color=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#334f65"</span>)<br>a=np.arange(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">7</span>)+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1.2</span><br>plt.xticks(a,c,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">15</span>)<br>plt.yticks(list(range(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">60</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">10</span>)),fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">15</span>)<br>plt.legend([<span class="hljs-string" style="color: #98c379; line-height: 26px;">"均值"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"中位数"</span>])<br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"各学历薪资均值及中位数比较图"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">16</span>)<br><br>plt.xlabel(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"学历"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br>plt.ylabel(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"薪资(单位:K)"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br><br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> e,f <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> zip(v,w):<br> plt.text(e,f+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"{}K"</span>.format(f),ha=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"center"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> g,h <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> zip(,x):<br> plt.text(g,h+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"{}K"</span>.format(h),ha=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"center"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/4d6f4473-3773-43cb-9c38-95e65cb27fbf.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从上图可以看得出,薪资和学历一般是呈现正相关的关系,学历越高薪资也会越高,<strong style="color: rgb(0, 0, 0); font-weight: bold; background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;">兄弟们,不说了写好卷学历去了</strong>。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.6 学历与岗位需求的数据分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用饼状图来展示不同学历在岗位需求中的占比。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 学历与岗位需求的数据分析</span><br>data=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"diploma"</span>].value_counts()<br>y=data.values<br>plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>))<br>plt.pie(y,labels=data.index,autopct=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"%.2f%%"</span>)<br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/4d49e2a9-444b-449e-b064-511556874cd1.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从上图可以看出,数据分析岗位招聘要求中本科学历是占绝大多数的。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.7 工龄与薪资数据分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用条状图来展示不同工龄的薪资分布。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 工龄与薪资数据分析</span><br>d=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"avg_address"</span>].groupby(df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>])<br>d_avg = d.mean()<br>c=list(d_avg.index)<br>v=list(range(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,len(c)+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>))<br>w=d_avg.values.astype(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"int64"</span>)<br>x=d.median().values.astype(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"int64"</span>)<br>move=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0.4</span><br><br>plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">14</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">8</span>))<br>plt.bar(v,w,width=move,color=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#002c53"</span>)<br>plt.bar(,x,width=move,color=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"#0c84c6"</span>)<br>a=np.arange(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">4</span>)+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1.2</span><br>plt.xticks(a,c,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">15</span>)<br>plt.yticks(list(range(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">0</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">35</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">5</span>)),fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">15</span>)<br>plt.legend([<span class="hljs-string" style="color: #98c379; line-height: 26px;">"均值"</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"中位数"</span>])<br>plt.title(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"各学历薪资均值及中位数比较图"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">16</span>)<br><br>plt.xlabel(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"工作经验"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br>plt.ylabel(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"薪资(单位:K)"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br><br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> e,f <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> zip(v,w):<br> plt.text(e,f+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"{}K"</span>.format(f),ha=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"center"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> g,h <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> zip(,x):<br> plt.text(g,h+<span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span>,<span class="hljs-string" style="color: #98c379; line-height: 26px;">"{}K"</span>.format(h),ha=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"center"</span>,fontsize=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">12</span>)<br>plt.show()<br></code></pre>
<figure data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; display: flex; flex-direction: column; justify-content: center; align-items: center;"><img src="https://files.mdnice.com/user/84866/70ceeae4-a983-4252-86ee-4b2a0e3bbac3.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; object-fit: fill; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></figure>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">从图中可以看出,工作的年限越长,工资也会相应的高一些。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.8 工龄与市场需求分析</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">我们可以使用饼状图来展示不同工龄在市场需求中的占比。</p>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;"><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 工龄与市场需求分析</span><br>data=df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">"experience"</span>].value_counts()<br>y=data.values<br>plt.figure(figsize=(<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>,<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>))<br>plt.pie(y,labels=data.index,autopct=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"%.2f%%"</span>,colors = [<span class="hljs-string" style="color: #98c379; line-height: 26px;">'tomato'</span>, <span class="hljs-string" style="color: #98c379; line-height: 26px;">'lightskyblue'</span>, <span class="hljs-string" style="color: #98c379; line-height: 26px;">'goldenrod'</span>, <span class="hljs-string" style="color: #98c379; line-height: 26px;">'green'</span>])<br>plt.show()<br></code></pre>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;"><img src="https://files.mdnice.com/user/84866/40c2e90e-ec43-4bb2-b28c-25350bbd1aee.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%;">
从上图可以看出,工龄3-5年工作的人有一定的工作经验,工资也相对较小,所以比较受欢迎。的需求量是最大的占35.87%,该3-5年工作的人有一定的工作经验,工资也相对较小,所以比较受欢迎。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">3.9 数据分析岗技能需求情况</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<pre class="custom" data-tool="mdnice编辑器" style="border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;">tag = df[<span class="hljs-string" style="color: #98c379; line-height: 26px;">'tags'</span>].tolist()<br>tags = []<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> item <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> tag:<br> item_split = item.split(<span class="hljs-string" style="color: #98c379; line-height: 26px;">','</span>)<br> tags.extend(item_split)<br><br>counter = Counter(tags)<br>element_counts = dict(counter)<br><br>data = []<br><span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">for</span> item <span class="hljs-keyword" style="color: #c678dd; line-height: 26px;">in</span> element_counts.keys():<br> data.append((item,element_counts.get(item)))<br> <br>c = (<br> WordCloud()<br> .add(<br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 系列名称,用于 tooltip 的显示,legend 的图例筛选。</span><br> series_name=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"数据分析岗位技能需求"</span>, <br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 系列数据项,[(word1, count1), (word2, count2)]</span><br> data_pair=data, <br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 单词字体大小范围</span><br> word_size_range=[<span class="hljs-number" style="color: #d19a66; line-height: 26px;">6</span>, <span class="hljs-number" style="color: #d19a66; line-height: 26px;">66</span>])<br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 全局配置项</span><br> .set_global_opts(<br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 标题设置</span><br> title_opts=opts.TitleOpts(<br> title=<span class="hljs-string" style="color: #98c379; line-height: 26px;">"数据分析岗位技能需求"</span>, title_textstyle_opts=opts.TextStyleOpts(font_size=<span class="hljs-number" style="color: #d19a66; line-height: 26px;">23</span>)<br> ),<br> <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 提示框设置</span><br> tooltip_opts=opts.TooltipOpts(is_show=<span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">True</span>),<br> )<br> .render(<span class="hljs-string" style="color: #98c379; line-height: 26px;">"basic_wordcloud.html"</span>)<br>)<br></code></pre>
<figure data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; display: flex; flex-direction: column; justify-content: center; align-items: center;"><img src="https://files.mdnice.com/user/84866/93240869-f703-442f-ab93-e39795fbc77a.png" alt style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; max-width: 100%; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-right-width: 3px; border-top-color: rgba(0, 0, 0, 0.4); border-bottom-color: rgba(0, 0, 0, 0.4); border-left-color: rgba(0, 0, 0, 0.4); border-right-color: rgba(0, 0, 0, 0.4); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; object-fit: fill; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;"></figure>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">从上图可以看出,SQL、Python等数据分析工具是基础技能,数据挖掘、大数据处理、建模等高级技能是加分项。</p>
<h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96); margin-top: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 2px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow-x: unset; overflow-y: unset; position: relative; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 22px; color: rgb(255, 255, 255); background-color: rgb(239, 112, 96); line-height: 1.5em; letter-spacing: 0em; align-items: unset; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 5px; overflow-x: unset; overflow-y: unset; padding-top: 3px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;">四、结论与建议</span><span class="suffix" style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233); align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: no-repeat; background-size: auto; border-top-style: none; border-bottom-style: solid; border-left-style: none; border-right-style: solid; border-top-width: 1px; border-bottom-width: 36px; border-left-width: 1px; border-right-width: 20px; border-top-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-right-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; box-shadow: none; color: rgb(0, 0, 0); display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; overflow-x: unset; overflow-y: unset; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; position: relative; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset;"> </span></h2>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">通过对BOSS直聘平台上数据分析师招聘信息的可视化分析,我们得出以下结论:</p>
<ul data-tool="mdnice编辑器" style="list-style-type: disc; margin-top: 8px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 25px; padding-right: 0px; color: rgb(0, 0, 0);">
<li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">数据分析师岗位主要集中在一线城市和新一线城市,薪资水平较高但竞争激烈。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">市场对数据分析师的经验和学历要求以本科为主,但高级岗位对学历和经验要求更高。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">SQL、Python等数据分析工具是基础技能,机器学习、大数据处理等高级技能是加分项。</section></li></ul>
<p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-top: 8px; padding-bottom: 8px; padding-left: 0px; padding-right: 0px;">针对以上结论,我们提出以下建议:</p>
<ul data-tool="mdnice编辑器" style="list-style-type: disc; margin-top: 8px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 25px; padding-right: 0px; color: rgb(0, 0, 0);">
<li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">求职者应结合自身实际情况,选择适合自己的城市和行业方向。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">注重提升个人技能和经验积累,尤其是SQL、Python等数据分析工具的使用能力。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; color: rgb(1, 1, 1); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal;">关注市场动态和新兴技术趋势,不断拓展自己的知识边界和技能组合。</section></li></ul>
</section>
页:
[1]