title: Use Pandas' NaNs to filter out holes in time series
body: <p>I am having a bit of trouble filtering data with pandas NAs. I have a data frame looking like this:</p>
  
  <pre><code>        Jan       Feb       Mar       Apr       May June
  0  0.349143  0.249041  0.244352       NaN  0.425336  NaN
  1  0.530616  0.816829       NaN  0.212282  0.099364  NaN
  2  0.713001  0.073601  0.242077  0.553908  NaN       NaN
  3  0.245295  0.007016  0.444352  0.515705  0.497119  NaN
  4  0.195662  0.007249       NaN  0.852287  NaN       NaN
  </code></pre>
  
  <p>and I need to filter out the rows that have "holes". I think of the rows as time series, and by a hole I mean NAs in the middle of the series, but not at the end. I.e. in the data frame above, lines 0, 1 and 4 have holes, but 2 and 3 do not (having NAs only at the end of the row). </p>
  
  <p>The only way I could think of so far is something like this:</p>
  
  <pre><code>for rowindex, row in df.iterrows():
      # now step through each entry in the row 
      # and after encountering the first NA, 
      # check if all subsequent values are NA too.
  </code></pre>
  
  <p>But I was hoping that there might be a less convoluted and more efficient way to do it.</p>
  
  <p>Thanks,
  Anne</p>