title: Remove rows from Pandas dataframe where value only appears once
body: <p>I have a dataframe with monthly records for different IDs, and I need to do some analysis only on the IDs that have multiple months of records.</p>
  
  <pre><code>ID    Month       Metric1    Metric2
  1     2018-01-01  4          3      
  1     2018-02-01  3          2
  2     2018-02-01  1          5
  3     2018-01-01  4          2
  3     2018-02-01  6          3
  4     2018-01-01  3          1
  </code></pre>
  
  <p>How would I filter out the rows of ID that only appear once and keep those with multiple rows and get a result like</p>
  
  <pre><code>ID    Month       Metric1    Metric2
  1     2018-01-01  4          3      
  1     2018-02-01  3          2
  3     2018-01-01  4          2
  3     2018-02-01  6          3
  </code></pre>
  
  <p>I've looked at some other pages that mention using something like:</p>
  
  <pre><code>df = df[df.groupby('ID').ID.transform(len) &gt; 1]
  </code></pre>
  
  <p>But I don't want to lose the metrics from each month by grouping.</p>