title: Pandas: Group Data by column A, Filter A by existing values of column B
body: <p>I'm new to pandas and want to create a new dataset with grouped and filtered data.
  Right now, my dataset contains two columns looking like this (first column with A, B or C, second with value): </p>
  
  <pre><code>A 1 
  
  A 2
  
  A 3
  
  A 4 
  
  B 1
  
  B 2
  
  B 3 
  
  C 4
  </code></pre>
  
  <p>--> now I want to group by the keys of the first column (A,B,C) , and show only the keys, where the values 1 AND 2 exist.
  So that my new data set looks like:</p>
  
  <pre><code>A 1
  
  A 2
  
  B 1
  
  B 2
  </code></pre>
  
  <p>Until now, I'm only able to print everything but I don't know how to filter:</p>
  
  <pre><code>for name, group in data.groupby('keys'):
     print(name)
     print(group)
  </code></pre>
  
  <p>I'm thankful for any help!</p>