title: Get first and last month in pandas dataframe where a specific value occurs
body: <p>I have the foll. dataframe:</p>
  
  <pre><code>datetime    Year    cal val
  1/1/2000    2000    1   0.23
  1/2/2000    2000    1   0.34
  2/3/2000    2000    1   0.45
  4/4/2000    2000    2   0.56
  4/5/2000    2000    2   0.67
  4/6/2000    2000    2   0.78
  5/7/2000    2000    3   0.89
  7/8/2000    2000    3   1
  7/9/2000    2000    3   1.11
  </code></pre>
  
  <p>The datatime column represents the dataframe index.</p>
  
  <p>I would like to find the month with the last cal == 1 value (this would be <code>february</code>). Similarly, I want to find the month with the first cal == 3 value (this would be <code>may</code> in this example.). right now, I can do subset:</p>
  
  <pre><code>df[df.cal == 1]
  </code></pre>
  
  <p>but not sure how to proceed from this.</p>