title: Pandas sum and max across axis 1 in new column
body: <p>I have df below:</p>
  
  <pre><code>  Hour                                      1     2    
      CU0111-012379-H Output Energy, (Wh/h)   2.0  3.0    
                      Lights (Wh)             4.0  5.0  
                      Lights+Media (Wh)       0.0  0.0    
                      Total Usage (h)         0.0  2.0     
                      Lights (h)              0.0  1.0   
                      Light+Media (h)         0.0   0.0    
                      Battery Voltage, (V)   13.5  13.7     
                      Max Watt, W             7.5   4.5      
  </code></pre>
  
  <p>and I have added a Total Column at the end:</p>
  
  <pre><code>col_list= list(df)
  df['Total'] = df[col_list].sum(axis=1)
  
    Hour                                      1     2   Total 
      CU0111-012379-H Output Energy, (Wh/h)   2.0  3.0   5.0  
                      Lights (Wh)             4.0  5.0   9.0
                      Lights+Media (Wh)       0.0  0.0   0.0  
                      Total Usage (h)         0.0  2.0   2.0   
                      Lights (h)              0.0  1.0   1.0 
                      Light+Media (h)         0.0   0.0  0.0   
                      Battery Voltage, (V)   13.5  13.7  27.2   
                      Max Watt, W             7.5   4.5  12.0
  </code></pre>
  
  <p>However. I would like to get the max value across axis 1, not the sum, in the total column for:</p>
  
  <pre><code> Battery Voltage, (V)      
   Max Watt, W
  </code></pre>
  
  <p>Such that df will be:</p>
  
  <pre><code>  Hour                                      1     2   Total/Max 
      CU0111-012379-H Output Energy, (Wh/h)   2.0  3.0   5.0  
                      Lights (Wh)             4.0  5.0   9.0
                      Lights+Media (Wh)       0.0  0.0   0.0  
                      Total Usage (h)         0.0  2.0   2.0   
                      Lights (h)              0.0  1.0   1.0 
                      Light+Media (h)         0.0   0.0  0.0   
                      Battery Voltage, (V)   13.5  13.7  13.7 &lt;-max  
                      Max Watt, W             7.5   4.5  7.5  &lt;-max    
  </code></pre>
  
  <p>a diabolical beginners attempt might look like this  : </p>
  
  <pre><code>df3['Total/Max'] = d3[col_list].sum(axis=1).df3.groupby(level=1).df3['Battery Voltage, (v)'].transform(max)
  </code></pre>