title: Is there a way to only show specific subgroups of a pandas column when making a Pivot Table or Crosstab?
body: <p>I would like to show the averages of weekly wages of specific jobs within my data set. One of the columns is titled &quot;Department&quot; and contains 16 unique values, but I only need 3 of these.</p>
  <p>My current code is this:</p>
  <pre><code>pivot2 = pd.pivot_table(wage, index='Department', values='Weekly', aggfunc = ['mean'])
  pivot2
  </code></pre>
  <p>'wage' is the name of my dataframe, 'Department' is the column I need to categorize by, and 'Weekly' is the column containing the weekly wages of each employee.</p>
  <p>As of right now it returns something that looks like this and shows all of the unique values, but how would I make the table only show Marketing, Production, and Engineering?:
  <a href="https://i.stack.imgur.com/53L4n.png" rel="nofollow noreferrer">chart</a></p>
  <p>Thank you!</p>