title: Compare two columns in data frame and highlight value using pandas style
body: <p>I'm trying to highlight some values in some columns in data frame using pandas styles like:  </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  np.random.seed(24)
  df = pd.DataFrame({'A': np.linspace(1, 10, 10)})
  df = pd.concat([df, pd.DataFrame(np.random.randn(10, 4), 
  columns=list('BCDE'))],axis=1)
  df.iloc[0, 2] = np.nan
  
  def highlight_greater(row):
  
      color=""
      if row['B'] &gt; row['C']:
         color = 'red'
      elif row['D'] &gt; row['E']:
          color = 'gray'
  
      background = ['background-color: {}'.format(color) for _ in row]
      return background
  
  with open ('out.html','w') as out:
      print &gt;&gt; out, df.style.apply(highlight_greater, axis=1).render()
  </code></pre>
  
  <p>That's work fine, but not correspond to my objectif, i want only to highlight B and D columns. This script highlight all the columns in the row if match condition.
  Any Idea ? Thanks</p>