title: Subsetting data in Python
body: <p>I want to use the equivalent of the subset command in R for some Python code I am writing.</p>
  
  <p>Here is my data:</p>
  
  <pre><code>col1    col2    col3    col4    col5
  100002  2006    1.1 0.01    6352
  100002  2006    1.2 0.84    304518
  100002  2006    2   1.52    148219
  100002  2007    1.1 0.01    6292
  10002   2006    1.1 0.01    5968
  10002   2006    1.2 0.25    104318
  10002   2007    1.1 0.01    6800
  10002   2007    4   2.03    25446
  10002   2008    1.1 0.01    6408
  </code></pre>
  
  <p>I want to subset the data based on contents of <code>col1</code> and <code>col2</code>. (The unique values in col1 are 100002 and 10002, and in col2 are 2006,2007 and 2008.)</p>
  
  <p>This can be done in R using the subset command, is there anything similar in Python?</p>