title: Match Value and Get its Column Header in python
body: <p><a href="https://i.stack.imgur.com/2czjh.png" rel="nofollow noreferrer">Sample</a></p>
  
  <p>I have 1000 by 6 dataframe, where A,B,C,D were rated by people on scale of 1-10. </p>
  
  <p>In SELECT column, I have a value, which in all cases is same as value in either of A/B/C/D.</p>
  
  <p>I want to change value in 'SELECT' to name of column to which it matches. For example, for ID 1, SELECT = 1, and D = 1, so the value of select should change to D.</p>
  
  <pre><code>import pandas as pd
  df = pd.read_excel("u.xlsx",sheet_name = "Sheet2",header = 0)
  </code></pre>
  
  <p>But I am lost how to proceed.</p>