title: Generating sub data frame based on a value in an column
body: <p>I have following data frame in pandas. Now I want to generate sub data frame if I see a value in Activity column. So for example, I want to have data frame with all the data with Name <code>A</code> IF Activity column as value <code>3</code> or <code>5</code>.</p>
  
  <pre><code>Name    Date           Activity
  A       01-02-2015       1
  A       01-03-2015       2
  A       01-04-2015       3
  A       01-04-2015       1
  B       01-02-2015       1
  B       01-02-2015       2
  B       01-03-2015       1
  B       01-04-2015       5
  C       01-31-2015       1
  C       01-31-2015       2
  C       01-31-2015       2
  </code></pre>
  
  <p>So for the above data, I want to get
  <code>df_A</code> as</p>
  
  <pre><code>Name    Date           Activity
  A       01-02-2015       1
  A       01-03-2015       2
  A       01-04-2015       3
  A       01-04-2015       1
  </code></pre>
  
  <p><code>df_B</code> as</p>
  
  <pre><code>B       01-02-2015       1
  B       01-02-2015       2
  B       01-03-2015       1
  B       01-04-2015       5
  </code></pre>
  
  <p>Since Name <code>C</code> does not have <code>3</code> or <code>5</code> in the column <code>Activity</code>, I do not want to get this data frame.</p>
  
  <p>Also, the names in the data frame can vary with each input file.</p>
  
  <p>Once I have these data frame separated, I want to plot a time series. </p>