title: python dataframe: return column name in apply lambda
body: <p>I want to use <strong><em>apply(applymap) and lambda</em></strong> functions to get the column name for every element in <strong><em>dfx</em></strong> (a dataframe). The <strong><em>lambda</em></strong> function is used for mapping another dataframe into <strong><em>dfx</em></strong>, and it will be rewritten afterwards.</p>
  
  <p><strong>dfx</strong></p>
  
  <pre><code>             A     B    C
  2011-01-10   123   12   123 
  2011-01-10   12    32   312
  2011-01-11   44    1    30.99   
  </code></pre>
  
  <p><strong>pseudocode</strong></p>
  
  <pre><code>output = dfx.apply(lambda r:r.column)
  </code></pre>
  
  <p>I don't know how to write this part "r:r.column" </p>
  
  <p><strong>intended output</strong></p>
  
  <pre><code>             A    B    C
  2011-01-10   A    B    C 
  2011-01-10   A    B    C
  2011-01-11   A    B    C  
  </code></pre>
  
  <p>Any help is more than welcome! Thanks a lot!!</p>