title: Pandas: if row in column A contains "x", write "y" to row in column B
body: <p>For <code>pandas</code>, I'm looking for a way to write conditional values to each row in column B, based on substrings for corresponding rows in column A.</p>
  
  <p>So if cell in <code>A</code> contains <code>"BULL"</code>, write <code>"Long"</code> to <code>B</code>. Or if cell in <code>A</code> contains <code>"BEAR"</code>, write <code>"Short"</code> to <code>B</code>.</p>
  
  <p>Desired output:</p>
  
  <pre><code>A                  B
  "BULL APPLE X5"    "Long"
  "BEAR APPLE X5"    "Short"
  "BULL APPLE X5"    "Long"
  </code></pre>
  
  <p>B is initially empty: <code>df = pd.DataFrame([['BULL APPLE X5',''],['BEAR APPLE X5',''],['BULL APPLE X5','']],columns=['A','B'])</code></p>