title: Group by and Filter with Pandas without loosing groupby
body: <p>I'm a begginer in the subject and didn't find anything to help me here so far.
  I'm struggling in grouping my data and then filtering with a value I need.</p>
  <p>Like the example,</p>
  <p><img src="https://i.stack.imgur.com/2OiTp.png" alt="Table" /></p>
  <p>I need to Know, for example, how many Red Cars Juan bought.
  (Red Cars sells for each client).
  When I try, I loose the group or the filter, I can't do both.</p>
  <p>Can someone help me or suggest a post please?</p>
  <p><strong>Edit1.</strong></p>
  <p>With the help of the community, I find this as my solution:</p>
  <pre><code>df = df.loc[:, df.columns.intersection(['Name', 'Car colour', 'Amount'])]
  
  df = df.query('Car colour == Red')
  
  df.groupby(['Name', 'Car colour'])['Amount'].sum().reset_index()
  </code></pre>