title: Check if Pandas DataFrame cell contains certain string
body: <p>Suppose I have the following Pandas DataFrame:</p>
  
  <pre><code>         a        b             
  0        NAN      BABA UN EQUITY
  1        NAN      2018  
  2        NAN      2017
  3        NAN      2016
  4        NAN      NAN
  5        NAN      700 HK EQUITY
  6        NAN      2018  
  7        NAN      2017
  8        NAN      2016
  9        NAN      NAN 
  </code></pre>
  
  <p>I want to check each cell in column <code>b</code> to see if it contains the string <code>EQUITY</code>. If it does, I want to replace the cells in column <code>a</code>, the next row until a row that is all <code>NAN</code> with the previous string, to get the edited DataFrame as follows:    </p>
  
  <pre><code>         a                 b             
  0        NAN               BABA UN EQUITY
  1        BABA UN EQUITY    2018  
  2        BABA UN EQUITY    2017
  3        BABA UN EQUITY    2016
  4        NAN               NAN
  5        NAN               700 HK EQUITY
  6        700 HK EQUITY     2018  
  7        700 HK EQUITY     2017
  8        700 HK EQUITY     2016
  9        NAN               NAN         
  </code></pre>
  
  <p>My actual DataFrame is much larger than the above, but the format is similar. I'm very new to Pandas but I think I can figure out the text replacement part, by using
  <code>sheet.loc</code> and replacing the cell values in a loop.</p>
  
  <p>However, I am having trouble figuring out how to check whether a cell contains <code>EQUITY</code>. It seems that <code>str.contains</code> is what I should be using, but it's not clear to me how to do that.</p>
  
  <p>Thanks!</p>