title: How to highlight dataframe based on another dataframe value so that the highlighted dataframe can be exported to excel
body: <p>I have two dataframes of lets say same shape, need to compare each cell of dataframes with one another. If they are mismatched or one value is null then have to write the bigger dataframe to excel with highlighting cells where mismatched or null value was true.</p>
  
  <p>i calculated the two dataframe differences as another dataframe with boolean values.</p>
  
  <pre class="lang-py prettyprint-override"><code>data1 = [['tom', 10], ['nick', 15], ['juli', 14]] 
  data2=[['tom', 10], ['sam', 15], ['juli', 14]] 
  
  # Create the pandas DataFrame 
  df1 = pd.DataFrame(data, columns = ['Name', 'Age']) 
  df2 = pd.DataFrame(data2, columns = ['Name', 'Age']) 
  df1.replace(r'^\s*$', np.nan, regex=True, inplace=True)
  df2= pd.read_excel(excel_file, sheet_name='res', header=None)
  df2.replace(r'^\s*$', np.nan, regex=True, inplace=True)
  df2.fillna(0, inplace=True)
  df1.fillna(0, inplace=True)
  
  difference = df1== df2 #this have boolean values True if value match false if mismatch or null
  </code></pre>
  
  <p>now i want to write df1 with cells highlighted according to difference. e.g if difference cell1 value is false the i want to higlight df1 cell1 as yellow and then write the whole df1 with highlights to excel.</p>
  
  <p>here is <a href="https://i.stack.imgur.com/FNpIj.png" rel="nofollow noreferrer">df1</a> and <a href="https://i.stack.imgur.com/2F3u5.png" rel="nofollow noreferrer">df2</a> i want <a href="https://i.stack.imgur.com/iILSz.png" rel="nofollow noreferrer">this</a> as final answer. In final answer nick is highlighted(i want to highlight with background color). </p>
  
  <p>i already tried using pandas Styler.applymap and Styler.apply but no success as two dataframe are involved. Maybe i am not able to think this problem straight.</p>
  
  <p>df1:</p>
  
  <p><a href="https://i.stack.imgur.com/FNpIj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FNpIj.png" alt="enter image description here"></a></p>
  
  <p>df2:</p>
  
  <p><a href="https://i.stack.imgur.com/2F3u5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2F3u5.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/iILSz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iILSz.png" alt="enter image description here"></a></p>