擅长:python、mysql、java
<p>在这一行中:</p>
<pre><code>jobtitlelist = (salaries.JobTitle.value_counts()>500)[0:10]
</code></pre>
<p>首先找到至少有500条记录的工作,然后选择前10个工作,这些工作用于计算平均总薪酬福利。所以你的工作流程是</p>
<ol>
<li>只保留至少有500条记录的职称</li>
<li>取前10个职位</li>
<li>计算平均工资总额</li>
</ol>
<p>但根据你的问题,你的工作流程应该</p>
<ol>
<li>只保留至少有500条记录的职称</li>
<li>计算步骤1)中工作的平均总薪酬</li>
<li>按升序排序平均工资总额</li>
<li>结果数据帧的前10行将是您要查找的</li>
</ol>