title: How to reverse a dummy variables from a pandas dataframe
body: <p>I would like to reverse a dataframe with dummy variables. For example, </p>
  
  <p>from df_input: </p>
  
  <pre><code>Course_01 Course_02 Course_03 
    0           0         1 
    1           0         0 
    0           1         0 
  </code></pre>
  
  <p>To df_output</p>
  
  <pre><code>   Course
  0 03
  1 01
  2 02
  </code></pre>
  
  <p>I have been looking at the solution provided at <a href="https://stackoverflow.com/questions/26762100/reconstruct-a-categorical-variable-from-dummies-in-pandas">Reconstruct a categorical variable from dummies in pandas</a> but it did not work. Please, Any help would be much appreciated. </p>
  
  <p>Many Thanks,
  Best Regards,
  Carlo  </p>